Skip to content
SilktideHelp

Prohibited ARIA attribute

Silktide checks that every ARIA attribute on your pages is one the element's role actually supports. Attributes that a role does not support, and attributes that are not part of the ARIA standard at all, are ignored by browsers - the behavior the author intended never happens.

<!-- Problem: aria-checked means nothing on a button -->
<button aria-checked="true">Bold</button>

<!-- Fix: use a role that supports the state you need -->
<button role="switch" aria-checked="true">Bold</button>

Why this matters

Each role supports a specific set of states and properties, and browsers discard anything outside that set. The page then looks correct in code review while users get nothing: a toggle whose state is never announced, a description that is never read. This category also catches misspelled attributes such as aria-lable - the most damaging case, because the author believes a label exists and a user gets none.

How to fix it

  1. Fix misspelled attribute names (aria-lable should be aria-label, aria-labeledby should be aria-labelledby).
  2. If the attribute is right but unsupported, change the element's role to one that supports it - or reconsider whether a native element already provides the behavior.
  3. If the attribute does nothing useful, remove it.

How Silktide tests this

  1. Find every element on the page that carries at least one aria- attribute.
  2. Determine the set of ARIA attributes valid for that element: the global attributes that work everywhere (such as aria-label and aria-hidden), plus the attributes supported by the element's role.
  3. Report attribute names that are not part of ARIA 1.2 - typically typos.
  4. Report recognized attributes used on an element whose role does not support them, or that require a role the element does not have.

Deprecated attributes are reported separately by Deprecated ARIA attribute, and attribute values are validated by Invalid ARIA attribute value.

Troubleshooting

The attribute works in my testing

Some screen reader and browser pairings tolerate nonstandard combinations that others discard. Conformance with the standard is what makes behavior predictable across the assistive technology you cannot test.

This check reports nothing even though I expect findings

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

Learn more

Last updated

Was this page helpful?