RE: Comment on Accname 1.1 (Includes Live AccName Prototype Test attached)

Hi,
In the case of your code, the accessible name would only be the span text, and not the inner button content. The same would be true if you changed this code to be a link as well.

So, accName = “Alternate Name”, and accDescription = “”.

The reason being that, in accordance with the AccName spec, aria-labelledby is always processed first and stops processing further if a valid name is computed using that. If this fails, then aria-label is processed instead and stops processing if a valid name is detected. Failing that, then the algorithm checks if the element has a native host semantic plus a supported naming mechanism or embedded content from which child nodes can then be computed from. Since an element can only be processed once, it is included where its name appears first in the algorithm, and then ignored if it is found later such as by duplicate ID refs using  aria-labelledby to reference the same element twice, or if the same elements are found within different parent/child structures where aria-labelledby references one element and also a parent element at the same time, etc.

You can see why the AccName computation can become extremely difficult to figure out in your head all the time because of all of these qualifiers and conditional statements, so, there is a mirror project on GitHub that provides a live executable representation of what we expect the accessible name and description computation to be based on what the AccName spec is meant to replicate within browsers, at
https://github.com/WhatSock/w3c-alternative-text-computation


I’ve attached a simple HTML page that you can edit directly to run the AccName Prototype code from GitHub, which includes the code you sent through earlier. You can modify the code to experiment with different combinations to see how this changes when you activate the “Calculate Accessible Name and Description” button when running the markup in your browser. Just change the file extension to .htm to use this. It doesn’t matter which browser you use to do this, the result will always be the same. Also, since this pulls directly from the GitHub code, it will always represent the latest AccName code, even as updates for 1.2 are worked on in the future.

The attached test page also can be used to run Visual ARIA, which automatically loads the bookmarklet documented at
https://accdc.github.io/visual-aria/github-bookmarklet/visual-aria.htm

Which is an educational utility for learning how various structural ARIA roles map when used together and when they are interacted with using the keyboard. As an FYI, Visual ARIA attempts to run the same AccName computation as provided within the AccName Prototype, which is shown when mousing over interactive elements, however it may not always be 100% accurate since it uses CSS rendering to display the results, which by their own nature end up changing the accessible name of an element. So treat this Visual ARIA feedback as an approximation if you use this.

That being said, the AccName Prototype itself is meant to be an exact representation of the AccName spec, so if you notice any issues or discrepancies, please let us know as soon as possible so we can correct them.

Also, the AccName Prototype code is open source, so you are welcome to use this within any project you like anywhere for any reason.

All the best,
Bryan



Bryan Garaventa
Principal Accessibility Architect
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com
415.624.2709 (o)
www.LevelAccess.com<http://www.levelaccess.com/>

From: Todd Briley <todd.briley@outlook.com>
Sent: Monday, February 04, 2019 10:47 AM
To: public-aria@w3.org
Subject: Comment on Accname 1.1

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.

Hi,

I’m trying to determine how the text alternative name algorithm should return the accessible name for the element with id of ‘target’ in the following markup.

<button aria-labelledby=”ref” id=”target”>Button Text</button>
<span id=”ref”>Alternate Name</span>

When chasing the value for the span, what rule in the text alternative name algorithm returns “Alternative Name”?

Thanks,
Todd

Received on Friday, 8 February 2019 00:00:34 UTC