RE: Accessible name on generic elements - was RE: Hawaiian Diacritics

Hi Matt, so let me confirm - what I am talking about is there is an aria-label on a generic element and the generic element is referenced by another element via aria-labelledby or aria-describedby.   Today, that aria-label on the generic element is picked up in the accessible name calculation on the referencing element.

<label for="txt_term">Term:</label><input id="txt_term" aria-describedby="term_icon"><span aria-label="Double dagger" id="term_icon" class="icon">icon_here</span>

I'm not suggesting there aren't better ways of doing things - but this type of thing is pretty common.  This change will necessitate role img or such being added to font icons and other uses where aria-label is used to replace icons and characters (this is currently a WCAG technique and thus this is overall good).  It will also mean the accessible name calculation will need to be changed to exclude aria-label on generic elements when they are referenced from other elements.  Another solution might be for people to use the role "paragraph" similar to how people create hacky solution with role text to support VoiceOver.

Jonathan

-----Original Message-----
From: Matt King <a11ythinker@gmail.com> 
Sent: Monday, May 9, 2022 8:07 PM
To: Jonathan Avila <jon.avila@levelaccess.com>; w3c-wai-ig@w3.org
Subject: RE: Accessible name on generic elements - was RE: Hawaiian Diacritics

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Jonathan,

This change has nothing to do with referencing in a name calc. It is just prohibiting naming of a generic element. Generic elements can still be used in the name calc for other elements.

Matt

-----Original Message-----
From: Jonathan Avila <jon.avila@levelaccess.com>
Sent: Monday, May 9, 2022 10:28 AM
To: w3c-wai-ig@w3.org
Subject: Accessible name on generic elements - was RE: Hawaiian Diacritics

Hi Matt, I'd like to know how this proposed changed that hasn't been well publicized would impact the accessible name calculation.  For example, generic elements with aria-label are often referenced from other elements via aria-labelledby and aria-describedby and the name would come through to elements that reference the generic elements.  Would the accessible name and description change?  Keep in mind that I'm talking about when these elements are referenced by other elements.  This reference is a common tactic I've experienced, and the current behavior is supported by assistive technology whereas the other behavior previously discussed is not well supported.

If the spec prohibits the use, then anything that relies on this accessible name either directly or indirectly would then likely fail WCAG as the intended meaning would not come through according to the specification even if supported by current assistive technology - is that correct?

Jonathan

-----Original Message-----
From: Matt King <a11ythinker@gmail.com>
Sent: Saturday, May 7, 2022 1:14 PM
To: 'Patrick H. Lauke' <redux@splintered.co.uk>; w3c-wai-ig@w3.org
Subject: RE: Hawaiian Diacritics

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


As of ARIA 1.2, which is in candidate recommendation phase now, authors are prohibited from using aria-label aria-labelledby, and aria-roledescription on a generic element, i.e., div or a span that do not have an explicitly declared role.

See definition of generic role:
https://www.w3.org/TR/wai-aria-1.2/#generic


Matt

-----Original Message-----
From: Patrick H. Lauke <redux@splintered.co.uk>
Sent: Friday, May 6, 2022 5:14 PM
To: w3c-wai-ig@w3.org
Subject: Re: Hawaiian Diacritics

On 06/05/2022 21:32, David Woolley wrote:

> In the example, your tool output is missing a lang attribute.  I think:
>
> <span aria-label=”Hawaii”>Hawai&#699;i</span>

Worth noting that the aria-label theoretically overrides anything inside the span, so the lang attribute would be pointless. Also worth noting that an aria-label on a generic span is generally (depending on browser/AT combination) not supported, as a generic span is not a an element that has a label/name.
https://developer.paciellogroup.com/blog/2017/07/short-note-on-aria-label-aria-labelledby-and-aria-describedby/


P--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke https://flickr.com/photos/redux/ | https://www.deviantart.com/redux

twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Tuesday, 10 May 2022 01:40:08 UTC