RE: Accessible name definition

Sarah,

 

Please check out section 5 in the APG: Providing Accessible Names and Descriptions

https://www.w3.org/TR/wai-aria-practices-1.2/#names_and_descriptions

 

It covers all the questions you have raised. It includes a table that provides naming guidance for every type of element.

 

Crucially, section 5 explains the incredible power and danger associated with using aria-label and aria-labelledby. Because they can override content, they need to be used with great care ... as sparingly as possible. As the guide says, no ARIA is better than bad ARIA.

 

Matt King

 

From: Ms J <ms.jflz.woop@gmail.com> 
Sent: Friday, April 8, 2022 7:41 AM
To: Michael Gower <michael.gower@ca.ibm.com>; w3c-wai-ig@w3.org
Subject: Re: Accessible name definition

 

Hi Michael,

 

Thanks for this. So what would you give as the definition of ‘accessible name’?

 

A <h1> is an element, but it isn’t a ‘user interface’ element as it isn’t interactive - it’s the ‘user interface’ bit it doesn’t satisfy. In the definition you linked to there is a note which says ‘user interface component’ and ‘user interface element’ are the same thing. If a heading is a ‘user interface element/component’ this implies it is convered by ‘label in name’ which I don’t believe it is.

 

Yes, I believe roles of lists can support aria-labels, but they aren’t required, so I just wanted to check if all semantic elements needed an accessible name either defined explicitly or inherited from the content?

 

The kind of thing I see is people using aria-labels to provide additional text for screen reader users instead of a CSS visually hidden class for example. I tested with JAWS and the aria-label on the heading was ignored but I suspect with other screen readers such as VoiceOver it may override the text in the heading tag. I definitely don’t think it would be a good strategy to use one on a heading and I recognise I am conflating ‘accessible name’ with ‘supports aria-label’. But I tend to justify ‘don’t use an aria-label as a means of providing extra visually hidden text’ by saying ‘aria-labels are used to define the accessible name of user interface elements (with some exceptions for certain roles), and a heading is not a user interface element so does not need an accessible name’. But I’m now wondering if this justification is incorrect?

 

Thanks

 

Sarah

 

  _____  

From: Michael Gower <michael.gower@ca.ibm.com <mailto:michael.gower@ca.ibm.com> >
Sent: Friday, April 8, 2022 3:03 pm
To: Ms J <ms.jflz.woop@gmail.com <mailto:ms.jflz.woop@gmail.com> >; w3c-wai-ig@w3.org <mailto:w3c-wai-ig@w3.org>  <w3c-wai-ig@w3.org <mailto:w3c-wai-ig@w3.org> >
Subject: Re: Accessible name definition 

 

Hi Sarah,

I’ll take a stab at responding to this in the context of WCAG, but note that I’m not as technical as many on this thread.

 

It’s important to distinguish between “user interface component”, a defined term used in WCAG <https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-user-interface-component>  for something that is operable, and “user interface element”, the phrase you quoted from the AccName spec, which is talking about elements in the sense of HTML, where any tagged object, such as <h1>, is an element, regardless of whether it’s operable.

 

You then go on to quote “accessible objects” from the wai-aria 1.1 spec. So, just to make sure we’re clear we’ve now talked about similar terms from three different specs.

 

A heading gets an accessible name from whatever text is between its opening and closing tags. That’s what is meant by that phrase. So many things that aren’t necessarily ‘components’ can get accessible names in the same way.

 

A heading with no text is worse less than useless. I can’t think of a reason one would put that on a page. So there should not be any occasion to put an aria-label on an empty heading tag. Generally, the advice is to natively provide accessible names where possible, not override them with aria-label.

 

Conversely, adding a role of heading to some text on a page WILL give that text the role of heading, and the text will be the heading’s accessible name. 

 

Although a list rarely has text (except inside the list items), I think it can technically support it. That’s probably why it isn’t mentioned in either 5.2.7.4 and 5.2.7.5.

 

Hope that helps. I’m sure someone will correct any inaccuracies I’ve made 😊

 

Mike

 

 

From: Ms J <ms.jflz.woop@gmail.com <mailto:ms.jflz.woop@gmail.com> >
Date: Friday, April 8, 2022 at 3:25 AM
To: w3c-wai-ig@w3.org <mailto:w3c-wai-ig@w3.org>  <w3c-wai-ig@w3.org <mailto:w3c-wai-ig@w3.org> >
Subject: [EXTERNAL] Accessible name definition

Hello, Please can you provide some clarity on what counts as an ‘accessible name’. The definition says The accessible name is the name of a ‘user interface element’. https://www.w3.org/TR/accname-1.1/#glossary ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart 




This Message Is From an External Sender 


This message came from outside your organization. 

ZjQcmQRYFpfptBannerEnd

Hello,

 

Please can you provide some clarity on what counts as an ‘accessible name’.

 

The definition says

 

The accessible name is the name of a ‘user interface element’.

 <https://www.w3.org/TR/accname-1.1/#glossary> https://www.w3.org/TR/accname-1.1/#glossary

 

But then the name computation mentions the name of ‘accessible objects’ and tasks about headings having accessible names:

 <https://www.w3.org/TR/wai-aria-1.1/#namecomputation> https://www.w3.org/TR/wai-aria-1.1/#namecomputation

 

I mainly just want to make sure I’m using terminology correctly. I appreciate there are other widgets and roles that are not ‘user interface components’ that do support or require an accessible name, such as regions or tabpanels. However, there are some that don’t require them such as a rule of ‘list’ - this isn’t on the list of roles supporting name from content, but wouldn’t generally require an aria-label or anything explicitly defining the accessible name.

 

I associate accessible names with anything I would use the aria-label attribute on. I would not usually refer to an empty heading as having no ‘accessible name’ and would not tend to use an aria-label on one.

 

Some clarity would be greatly appreciated!

 

Thank you

 

Sarah

 

 

Received on Thursday, 14 April 2022 07:31:24 UTC