Skip to main content
HighWCAG 4.1.2 · Level ARobust

ARIA Accordion / Widget State Contract

Validates aria-expanded toggle state transitions and verifies that aria-controls points to existing DOM target elements.

Rule ID: custom-widget-contract · reported under Needs review, because a person should confirm it.

Who this affects

How to fix it

Problem

<button onclick="toggle()">Accordion</button>

Fixed

<button aria-expanded="true" aria-controls="panel-1" onclick="toggle()">Accordion</button>
<div id="panel-1">Content</div>

These are short examples. In the extension, A11yEngine points to the element on your own page and can suggest a fix for your code (HTML, React, Vue or Tailwind).

Find this on your own pages

Check any page for this and 100+ other issues in your browser, free.

← All rules