WebAIM - Web Accessibility In Mind

E-mail List Archives

for

From: Steve Green
Date: Aug 4, 2025 7:59AM


I'm obviously familiar with the accessible name computation, and that the "aria-label" attribute overrides all the content in the link, but I don't understand why the heading role is not conveyed. The "aria-label" attribute doesn't override roles. If it's supposed to, why is the heading role still exposed in the accessibility tree?

I just checked using Voiceover on macOS and verified that it does indeed announce both the heading and link. If you're correct (and I am not convinced you are) it means the fault is in Safari and/or VoiceOver.

Since the thread has been trimmed, here's a reminder of the code:

<a href="#" aria-label="foo">
<h3>bar</h3>
</a>

The HTML specification allows heading elements to be contained in links, and I can't find anything in the ARIA specification that says the "aria-label" attribute overrides the roles of child elements.

Steve