RE: Accessible name computation and web-platform-tests

Hi,
Actually this has to do with the difference between the ‘root node’ and the ‘current node’, where, for widget controls, only the value is returned when the root node is not the same as the current node.

In this case, the root node is the heading, and that is where it stays during the computation. In contrast, the current node is recursively moved into the child nodes within the heading to compute the accessible name for the root node.

If this were a different test, such as testing the accessible name only on the combobox, then the title attribute would be used because both the root node and the current node are the same element, and the value property is not a valid labelling mechanism for a widget control.

However, since the root node and the current node don’t match, and the current node is a widget with a value, then it returns the name based on the AccName step 2E, where it states:

“■ If the embedded control has role combobox or listbox, return the text alternative of the chosen option.”
https://www.w3.org/TR/accname-1.1/


Since the accessible name for the combobox is already returned using its value, the title attribute is ignored.

Hopefully this makes sense.

All the best,
Bryan



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

From: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Sent: Friday, October 18, 2019 4:59 AM
To: public-aria@w3.org
Subject: Accessible name computation and web-platform-tests

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.

Hello,

I'm currently implementing the accessible name computation for HTML elements following https://w3c.github.io/accname/ and comparing the results with https://github.com/web-platform-tests/wpt/tree/574af55b103d2e732efa72af2719121f96db38f3/accname.


There's currently one test case that confuses me:
<h2>
  Country of origin:
  <input role="combobox" type="text" title="Choose your country." value="United States">
</h2>
from https://github.com/web-platform-tests/wpt/blob/574af55b103d2e732efa72af2719121f96db38f3/accname/name_heading-combobox-focusable-alternative-manual.html


The test expects the accessible name for the h2 element to be "Country of origin: United States". However, I'm not sure which path in https://w3c.github.io/accname/#mapping_additional_nd_te is taken to arrive at this computation as I arrive at "Countr of origin: Choose your country".

From my understanding we use 2F since h2 allows name from content and then we concetanate the text node and the accessible name of the input. However for the input I would use 2D which isn't defined in this document as far as I can tell. So I looked into https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element and there it says I should use the `title`. There's no mention of using the `value` attribute.

What I could see is 2E being used for the input (combobox) and then the `value` being considered as the selected option.

I would appreciate it if somebody could clarify this. So far the documents have been very clear to me.

Kind regards,
Sebastian

Received on Monday, 21 October 2019 22:43:27 UTC