EN, Change language
Englishالعربية
OM-042

Use semantic HTML to associate the accordion label with its content, and use ARIA only when semantic HTML alone is not sufficient.

The requirement (from the design system site)

Use semantic HTML to associate the accordion label with its content, and use ARIA only when semantic HTML alone is not sufficient.

Why it matters to users

Screen reader users list the headings on a page to jump to the topic they need. If accordion labels are plain div elements, they do not appear in that list, and the link between each label and its content is lost.

How to fix it

Put each accordion button inside a heading at the right level (h2 to h6) or use details and summary, and add aria-controls pointing to the panel id only where semantic HTML is not enough. Then scan again.

How we measure it

Met: every toggle is a summary, gup-accordion, or a button inside a heading element (h2-h6). A toggle tied to its panel by aria-controls only (no heading) counts half, so ARIA alone gives partly at best; no relationship fails.

The rule on the design system site

Related rules

Accordion label tied to panel · Oman OM-042 | xfix