UI component name and role (role-and-name)

Each user interface component (e.g., form elements, buttons, links) has a name and/or role attribute.


Completely invalid role attribute:

This custom button incorrectly uses role="foo", which is not a valid ARIA role:

Press me

Note: Possible to automatically test. Automated tools can flag role values that are not part of the ARIA specification (e.g., foo).

axe detected: 4.1.2  |  QualWeb detected: 4.1.2