Inputs with ARIA-Describedby and ARIA-Labelledby

Summary: In order to not be flagged as a violation in aXe, aria-describedby and aria-labelledby must reference by ID elements within the current document. There is no requirement, however, that the referenced elements must contain text or that the attributes have a value (that is, null values/"" is fine).

Note, however, that if you point an aria-labelledby only at an element that contains no text content, you have effectively erased the text label for that field, since aria-labelledby overrides all other labeling.

Has Labelledby and Describedby Pointing to Something (passes aXe)


Labelledby and Describedby Point to Nothing (passes aXe)


Labelledby and Describedby Point to Nothing On the Page (aXe violation)


Labelledby and Describedby Point to Something On the Page Which Has No Text Contents (passes aXe)