aria-required-attr

Roles with a required ARIA state/property must carry it

automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust

Checks that elements with an explicit role carry every unambiguous, context-independent required aria-* state/property for that role (e.g. role="checkbox" must have aria-checked).

Applies to. Applies to elements with an explicit, valid, non-abstract role that is also one of the small set of roles with a documented, context- independent required state/property (checkbox, combobox, heading, menuitemcheckbox, menuitemradio, meter, radio, scrollbar, separator, slider, switch) -- except when that explicit role is identical to the element's own native/implicit role (ACT 4e8ab6: e.g. <input type="checkbox" role="checkbox">, which is exempt because the native control's own state exposure already covers it; no aria-checked is required. helpers.aria.getNativeRoleForElement resolves this).

Expectation. Every required state/property for that role is present and non-empty. Graded by whether ARIA supplies a stand-in for the missing attribute:

  • FAIL where it does not, so the state is simply not exposed (aria-checked on checkbox/radio/switch/menuitemcheckbox/menuitemradio, aria-valuenow on slider/scrollbar/meter and on a focusable separator).
  • CANTTELL where ARIA defines an implicit value the role falls back to (aria-expanded on combobox, aria-level on heading), so the role still exposes a value and only the author knows whether it is the right one.

Examples

pass
<div role="checkbox" aria-checked="true"></div>

role="checkbox" requires `aria-checked`, and it's present.

fail
<div role="checkbox"></div>

role="checkbox" requires `aria-checked`; it's missing entirely.

View source