• Success Criterion 4.1.2
  • Conformance level A
  • W3C reference F15

Custom Dropdown or Slider With No Accessibility API Support

4.1.2 — Name, Role, Value

Scenario

Setting

A food delivery app's restaurant menu

What’s wrong

A custom-built control (dropdown, slider, dialog) doesn't tell assistive technology what it is or what state it's in, because it skips the standard accessibility hooks.

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 the custom control in DevTools' Accessibility panel: if it doesn't expose a name, role, or state through the accessibility API, it fails.

How to fix

Build the control on native elements or full ARIA (role + name + state) wired to the accessibility API.

<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 food delivery app's restaurant menu, this barrier is gone for screen-reader and voice-control users who can operate only what the accessibility tree exposes — they get the same result as anyone else here.

Who is affected

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

Learn more