WebAIM - Web Accessibility In Mind

E-mail List Archives

for

From: Steve Green
Date: Aug 5, 2025 3:17AM


I can’t find any specification that says the entire child element should be ignored when a parent element has an “aria-label” attribute. Can you point to such a specification? The accessible name computation says that the “aria-label” attribute takes precedence over the contents in terms of computing the parent element’s accessible name, but it does not say that the children should be completely ignored. If that was the case, an entire group of elements would be hidden if they had a parent element with role=”group” and an “aria-label” attribute. Obviously, this does not happen.

In terms of SC 4.1.1, the nesting is not improper under HTML5 and it passes the W3C HTML Nu validator. It also passes the tests done by the Axe and ARC Toolkit browser extensions.

Steve

From: Sailesh Panchang < <EMAIL REMOVED> >
Sent: 04 August 2025 17:50
To: WebAIM Discussion List < <EMAIL REMOVED> >
Cc: Steve Green < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Weird bug in both JAWS and NVDA (maybe)

Steve,
The entire content of the anchor element or button should be ignored as per my understanding and JAWS does that for the link but is apparently failing to do that for a button as you reported.
So the role of the content within the element is immaterial if it is meant to be ignored.
And in such situations the deprecated SC 4.1.1 would probably play a role: flag improper nesting of elements.
Thanks,
Sailesh

Sailesh Panchang

Email: <EMAIL REMOVED> <mailto: <EMAIL REMOVED> >
Deque Systems Inc | - Accessibility for Good | www.deque.com<;http://www.deque.com>;













On Mon, Aug 4, 2025 at 10:52 AM Steve Green via WebAIM-Forum < <EMAIL REMOVED> <mailto: <EMAIL REMOVED> >> wrote:
Here's another test that clearly shows something is wrong somewhere. I replaced the link element with a button, and JAWS now does announce the heading, but it ignores the "aria-label" attribute. You would expect it to behave the same as before, but it doesn't. It announces the following code as "heading level three button bar".

<button aria-label="foo">
<h3>bar</h3>
</button>

NVDA reads this as "button foo", so it is acknowledging the "aria-label" attribute and ignoring the heading, as it did with the link.

As before, Chrome's accessibility tree shows the button's name as "foo". The heading has a role of "h3" and contents of "bar".

Steve