Demo Mode — read-only previewStart free trial
Issues

Ensure an element's role supports its ARIA attributes

Critical4.1.2AXE · aria-allowed-attrDocs
Pages 1on W3C BAD Demo
Elements 1
Open 21d 23hsince 08.09.26
First seen 08.09.26
Last seen 08.09.26

Ensure an element's role supports its ARIA attributes

Scanner evidence

Engine: axeRule: aria-allowed-attrWCAG: 4.1.2
Ensure an element's role supports its ARIA attributes

How 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
  1. <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

    on https://www.w3.org/WAI

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.