Skip to content
SilktideHelp

Missing required ARIA attribute

Silktide checks elements that declare an ARIA role and verifies they also provide the attributes that role requires. Some roles are unusable without their attributes, such as a slider that never says what value it is set to.

<!-- Problem: a slider must expose its current value -->
<div role="slider" tabindex="0"></div>

<!-- Fix: provide the required state -->
<div role="slider" tabindex="0"
     aria-valuemin="0" aria-valuemax="100" aria-valuenow="50"></div>

Why this matters

Giving an element an role is a promise: "this is a slider", "this is a checkbox". Roles like these require state attributes because without them the promise is empty - a user lands on a checkbox and cannot tell whether it is checked, or on a slider and cannot tell its value or range. The control is announced, focusable, and impossible to use.

How to fix it

  1. Add the attributes the role requires, and keep them updated by script as the control's state changes - a static aria-checked="false" on a working checkbox is as misleading as none at all.
  2. Prefer native elements where they exist: <input type="checkbox"> and <input type="range"> expose their state automatically, with no ARIA to maintain.

How Silktide tests this

  1. Find every element on the page that declares a role attribute.
  2. Look up the attributes ARIA 1.2 requires for that role - for example, role="checkbox" requires aria-checked, and role="slider" requires aria-valuenow.
  3. Skip cases where the element exposes the state natively: a real checkbox or radio button already carries its checked state, a native <option> its selected state, and a slider with aria-valuetext may omit aria-valuenow.
  4. Report each element missing a required attribute.

Troubleshooting

A script sets the attribute after the page has loaded

Silktide tests the page as it loads. If your widget only adds its state attributes on first interaction, users hear a stateless control until then - render the initial state into the page instead.

This check reports nothing even though I expect findings

ARIA testing can be turned off per site. Check the advanced settings for the site.

Learn more

Last updated

Was this page helpful?