Audit use of AXTitle vs AXDescription for mozAccessibles
Categories
(Core :: Disability Access APIs, task, P3)
Tracking
()
People
(Reporter: morgan, Unassigned)
References
Details
(Whiteboard: [a11y-techdebt])
Generally, we map name and description as AXTitle and AXDescription (label) respectively.
VoiceOver expects that some mozAccessibles expose only a label and not a title. Historically, we've handled these roles case-by-case and added them to providesLabelNotTitle
, however we often get reports that there are additional elements we need to add, and I'm beginning to wonder if label-not-title is more of a rule than an exception.
It would be helpful to have someone read through our roles (and name computation?) and re-classify them according to this guidance from the Core AAM spec:
The approach to accessible names and accessible descriptions in AX API is somewhat different to the other platform APIs. Accessible names are exposed using the AXTitle property when the name is visually rendered, while the AXDescription property is used when the object's name is not rendered visually. An object's accessible description, where provided, should always be exposed in the AXHelp property.
We might need a different structure altogether, I dunno. Roles aren't mentioned in this (above) description so I'm inclined to think our current work is hacky.
Reporter | ||
Updated•3 years ago
|
Comment 1•2 years ago
|
||
Wow, this sounds rather complicated. Basically, accName needs to discern somehow whether the text is visible, so definitely not aria-label, but sometimes aaria-labelledby, never image alt text, although that rule could be bent because if one doesn't display images, the alt text, if present, gets rendered instead. Taking the above quoted section from the AAM spec as guidance, a button's inner text would be AXTitle, but if the button has an image and only alt text, it would not. Yikes.
Reporter | ||
Comment 2•2 years ago
•
|
||
Jamie and I did some testing on matrix yesterday. Here are some snapshots of current behaviour:
data:text/html,<button><div aria-label="foo"></div></button>
Us: AXTitle = foo, AXDescription = nil
Safari: same
data:text/html,<button><div>foo</div></button>
Us, Safari: same as above
data:text/html,<button><div aria-label="foo"></div><div>bar</div></button>
Us, Safari: AXTitle = foo bar, AXDescription = nil
data:text/html,<div id="label">foo</div><button aria-labelledby="label"></button>
Us: AXTitle = foo, AXDescription = nil
Safari: AXTitle = nil, AXDescription = foo
data:text/html,<div id="label" hidden>foo</div><button aria-labelledby="label"></button>
Us: AXTitle = foo, AXDescription = foo
Safari: AXTitle = nil, AXDescription = foo
Reporter | ||
Comment 3•2 years ago
|
||
I also found this guidance in the mapping table on the core AAM spec:
aria-label
: Property: AXDescription: <value>
aria-labelledby
: Property: AXDescription: <value>
Property: AXTitleUIElement: points to accessible node matching IDREF, if there is a single referenced element that is in the accessibility tree
aria-describedby
: Property: AXHelp: <value>
Updated•11 months ago
|
Updated•4 months ago
|
Description
•