RatedWithAI

RatedWithAI

Accessibility scanner

WCAG 2.1

4.1.2 Name, Role, Value

Level A success criterion

UI components must expose their name, role, and value to assistive technologies.

Why it matters

Custom controls without proper ARIA cannot be understood or operated by screen readers.

Common violations

  • Custom buttons without role or label
  • Sliders missing aria-valuenow
  • Modals without aria-labelledby

Code examples

Bad

<div class="btn">Save</div>

Good

<button type="button">Save</button>

How to fix

Use native HTML controls whenever possible, and add ARIA roles and labels to custom widgets.

Related criteria

Related resources

Test & fix this criterion

Use these free tools and guides to check and fix 4.1.2 Name, Role, Value violations:

Scan your site

Check your WCAG coverage in minutes

Start a free scan