Ensure an element's role supports its ARIA attributes
Scanner evidence
aria-allowed-attrWCAG: 4.1.2How to fix
Fix all of the following: ARIA attribute is not allowed: aria-level="2"
Affected pages (1)
Affected elements (1)
https://www.w3.org/WAI1
<a class="ytmVideoInfoVideoTitle" aria-level="2" href="https://www.youtube.com/watch?v=iWO5N3n1DXU"> <span class="ytAttributedStringHost ytmVideoInfoLink ytAttributedStringWhiteSpaceNoWrap" style=""> Web Accessibility Perspectives: Video Captions </span> </a>iframe > .ytmVideoInfoVideoTitle
AI guidance
Remediation suggestions generated by AI. Review before applying.
Why this matters: Screen reader users rely on accurate role semantics; unsupported ARIA attributes create confusion about element purpose and can cause assistive technologies to misinterpret or ignore the element entirely.
Before
<a class="ytmVideoInfoVideoTitle" aria-level="2" href="https://www.youtube.com/watch?v=iWO5N3n1DXU">
<span class="ytAttributedStringHost ytmVideoInfoLink ytAttributedStringWhiteSpaceNoWrap">Web Accessibility Perspectives: Video Captions</span>
</a>After
<a class="ytmVideoInfoVideoTitle" href="https://www.youtube.com/watch?v=iWO5N3n1DXU">
<span class="ytAttributedStringHost ytmVideoInfoLink ytAttributedStringWhiteSpaceNoWrap">Web Accessibility Perspectives: Video Captions</span>
</a>Notes: The aria-level attribute is only valid on elements with heading roles (role="heading"). Since this is a link, remove the unsupported attribute entirely. If heading semantics are needed, use a native <h2> element instead; if this must remain a link, let its implicit link role stand without modification. This addresses WCAG 4.1.2 (Name, Role, Value).
Powered by claude-haiku-4.5
Activity (0)
No activity yet.