- Success Criterion 4.1.2
- Conformance level A
- W3C reference F59
Clickable Div Turned Into a Control but Given No ARIA Role
4.1.2 — Name, Role, Value
Scenario
Setting
A community forum's discussion thread
What’s wrong
A div or span is turned into a clickable control with script, but is never given a role — screen readers announce it as plain text, not a button/control.
Example
During an audit of a community forum's discussion thread: a div or span is turned into a clickable control with script, but is never given a role — screen readers announce it as plain text, not a button/control.
Why it matters
Screen-reader and voice-control users who can operate only what the accessibility tree exposes. On a community forum's discussion thread specifically, they have to work around the barrier just to continue.
How to test
Inspect a scripted interactive control in DevTools: if it has no role attribute at all, screen readers announce it as plain text, not a control.
How to fix
Give the scripted control a proper role (or use a native button/link element).
Outcome
Fixed, a visitor to a community forum's discussion thread can complete the task without extra help.
Who is affected
Screen-reader and voice-control users who can operate only what the accessibility tree exposes.
Learn more
- Understanding Understanding document (opens in a new tab)
- Technique Related technique (opens in a new tab)
Related scenarios
- Custom Dropdown or Slider With No Accessibility API Support
- Content Changes That Never Update Their Accessible Name
- Scripted Link or Button With No Real Role or Keyboard Support
- Form Field With No Programmatic Label at All
- Assistive Technology Never Told Which Element Currently Has Focus
- Multi-Part Field Where Each Box Has No Individual Name