Short note on aria-label, aria-labelledby, and aria-describedby
Be careful when you use the
aria-describedby attributes, because they do not work consistently with all HTML elements. This is a short note on when (and when not) to use those attributes.
aria-labelledby attributes can be used to give an element an accessible name. The
aria-describedby attribute can be used to give an element an accessible description. Not all elements can be given an accessible name and/or description though.
aria-describedby attributes can be used with:
- interactive elements like
hrefattribute is present),
controlsattribute is present),
input(unless they are of
- elements that have a landmark role – either implicit (
form) or explicitly set via the
- elements that have an explicit widget role applied using the
roleattribute – there are 27 widget roles in ARIA 1.1, including
If you use
aria-describedby with any other elements (like
strong etc.), they generally won’t work across all browser/assistive technology combinations.
For more information on this, and on using ARIA with HTML in general, refer to the W3C Note on Using ARIA.