Why this matters
Assistive technologies need to know what each element is (role), what it's called (name), and its current state (expanded, checked, selected). Without this, custom widgets are opaque black boxes to screen reader users.
Common failures
These are the most frequent ways this criterion is violated in real-world websites:
- Custom buttons implemented as <div> or <span> without role='button'
- ARIA attributes used incorrectly or on wrong elements
- Missing accessible names on interactive elements
- State changes not communicated (e.g. accordion expanded but no aria-expanded)
- Custom select/dropdown without proper ARIA roles
How to fix
- Prefer native HTML elements that have built-in roles and states
- When using ARIA, follow the ARIA Authoring Practices patterns exactly
- Ensure every interactive element has an accessible name (aria-label, aria-labelledby, or visible label)
- Update aria-expanded, aria-selected, aria-checked etc. when state changes
- Test with a screen reader to verify announcements
Related axe-core rules
xsbl uses axe-core to automatically detect violations of this criterion. The following rules are checked:
Check your site for 4.1.2 violations
xsbl scans your rendered pages in a real browser and finds violations of this criterion automatically.
Scan your site freeOfficial reference: Understanding WCAG 4.1.2: Name, Role, Value (W3C)