Invalid ARIA attribute value
Silktide checks the value of every ARIA attribute on your pages against the values the standard allows for it. An attribute with an incorrect value, such as a checkbox state of "yes" instead of "true", is ignored by browsers, so the state it describes is never announced.
<!-- Problem: "yes" is not a valid value, the state is dropped -->
<div role="checkbox" aria-checked="yes">Subscribe</div>
<!-- Fix: use the defined token -->
<div role="checkbox" aria-checked="true">Subscribe</div>
Why this matters
Every attribute defines exactly which values
it accepts, and browsers discard anything else rather than guess. The
mistakes are usually intuitive-looking values - aria-expanded="1",
aria-checked="yes", aria-level="0" - that pass every visual test while
users get a
control with no announced state: a menu that never says whether it is open,
a checkbox that never says whether it is checked.
How to fix it
- Replace informal values with the tokens the attribute defines:
trueandfalserather thanyes,no,1, or0. - Check numeric attributes: counting attributes such as
aria-levelandaria-rowindexstart at 1, not 0. - Remove attributes left empty, such as
aria-checked=""- if there is no state to convey, the attribute should not be present.
The exact values allowed by each attribute are listed in the MDN ARIA attribute reference.
How Silktide tests this
- Find every element on the page that carries at least one
aria-attribute. - Check each attribute's value against the type ARIA 1.2 defines for it:
true/false attributes, three-state attributes such as
aria-checked(true,false,mixed), numbers and whole numbers, and attributes with fixed word lists such asaria-liveandaria-current. - Report each value that does not conform, saying what was expected.
Attributes that reference element IDs are tested by their own checks, such
as Missing aria-controls ID, and free-text attributes
like aria-label accept any text.
Troubleshooting
The value is set by a framework
Component libraries occasionally serialise states incorrectly (for example,
rendering aria-expanded="undefined"). The finding points at the element,
but the fix usually belongs in how the component is configured or in a
library update.
This check reports nothing even though I expect findings
ARIA testing can be turned off per website. Check the advanced settings for the website.