• Success Criterion 4.1.2
  • Conformance level A

State Attribute Present on an Element That Never Actually Changes

4.1.2 — Name, Role, Value

Scenario

Setting

A real-estate marketplace's listing page

What’s wrong

State attributes on elements that never change state (aria-expanded (the open/closed state in code) on a plain link) announcing false expandability.

Example

<div class="checkbox" onclick="toggle()"></div>

Why it matters

Screen-reader and voice-control users who can operate only what the accessibility tree exposes.

How to test

Inspect a control's aria state attributes: if a state attribute exists on an element that has no actual state to report (e.g., aria-expanded on a plain link), it fails.

How to fix

Remove state attributes from elements that have no state to report.

<input type="checkbox" id="opt-1">
<label for="opt-1">Email notifications</label>

A native input exposes its role and checked state automatically; a styled div exposes none of that without a lot of manual ARIA.

Outcome

On a real-estate marketplace's listing page, this barrier is gone for screen-reader and voice-control users who can operate only what the accessibility tree exposes — they no longer have to work around this.

Who is affected

Screen-reader and voice-control users who can operate only what the accessibility tree exposes.

Learn more