act-rules.github.io icon indicating copy to clipboard operation
act-rules.github.io copied to clipboard

Visible label is part of accessible name (2ee8b8): should common abrevations be accepted?

Open Jym77 opened this issue 4 years ago • 6 comments

The rule currently fails <a href="#" aria-label="123 avenue George Washington">123 ave G. Washington</a> since the text node is not contained in the accessible name. Maybe it should pass?

Even worse-ish, the rule passes <a href="#" aria-label="123 avenue George Washington"><span>123 ave</span> <span>G.</span> <span>Washington</span></a> since now there are 3 text nodes and each of them is included in the accessible name. It does feel wrong to accept the second but reject the first…

Related to #1458 and #1615

Jym77 avatar May 26 '21 07:05 Jym77

I think your first example would fail the SC, so I think it's reasonable for it to fail the rule too.

As for the second one, I don't think that should pass either. It definitely does, I wonder if we can do something about considering each word in order. Passing "G." Because the letter "G" is part of the accessible name seems a bit odd.

WilcoFiers avatar May 26 '21 12:05 WilcoFiers

I have a use case were incident reports are given a unique incident number (e.g. INC004). VoiceOver will announce this as "Incorporated" and NVDA will announce this as "Ink". Neither are technically correct as this is an abbreviation for "Incident."

In the following example, when saying "click ink" Voice Control activates the link. However, when saying "click I N C 004" no action is performed. <a href="#">INC004</a>

This example would be clearer for a SR user, but fail label in name. Should it fail though? <a href="#" aria-label="incident 004">INC004</a>

joesaiyang avatar May 27 '21 06:05 joesaiyang

@joesaiyang Yes I believe that probably should fail the SC.

WilcoFiers avatar Jun 09 '21 09:06 WilcoFiers

Talking to Carlos; we think the rule should be kept the way it is. What would be useful is to update the background to explain that abbreviations should fail, and that texts can be split up, which is to avoid false positives.

WilcoFiers avatar Nov 02 '21 10:11 WilcoFiers

Other examples to consider:

  • <a href="#" aria-label="Saint Mark's Square">St. Mark's Square</a>
  • <a href="#" aria-label="Doctor Grey">Dr. Grey</a>
  • <a href="#" aria-label="United States of America">USA</a>

kengdoj avatar Mar 09 '23 14:03 kengdoj

March 9 Task Force discussion/conclusion: expansions of visible label abbreviations in accessible name would fail.

kengdoj avatar Mar 09 '23 17:03 kengdoj