- Success Criterion 4.1.2
- Conformance level A
Button Built From a Link With No Real Destination
4.1.2 — Name, Role, Value
Scenario
Setting
A public library's catalog search
What’s wrong
Buttons implemented as <a href="#"> or <a> with no href (role wrong — keyboard semantics broken).
Example
Here's a real case from a public library's catalog search: buttons implemented as <a href="#"> or <a> with no href (role wrong — keyboard semantics broken).
Why it matters
Screen-reader and voice-control users who can operate only what the accessibility tree exposes. Here, on a public library's catalog search, the result is they are excluded from part of the experience.
How to test
Inspect an <a> tag used as a button (no real href, or href="#"): check whether the role and keyboard behavior match a real link — if not, it fails.
How to fix
Use a real <button> for actions; reserve <a> for navigation with a real href.
Outcome
After the fix, the same visitor to a public library's catalog search can now move past the barrier without workarounds.
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)
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
- Clickable Div Turned Into a Control but Given No ARIA Role
- Form Field With No Programmatic Label at All
- Assistive Technology Never Told Which Element Currently Has Focus