aria-labelledby
Difficulty: Advanced
Category:
- Structure
Traditional form labeling with the <label> has distinct limitations; you can only have one label for each form element. You cannot have one label for multiple form elements (consider “Telephone Number” as a label for 3 text boxes to comprise a complete telephone number). You also cannot have multiple labels for one form element (consider a text box that has a label preceding it and the word “required” immediately after it, both of which provide important information). The aria-labelledby attribute (part of the ARIA specification) overcomes these limitations by allowing any element to be labeled by any other page element.