Roles with UIA mappings for control type: text may be incorrect?
scottaohara opened this issue · 4 comments
See w3c/html-aam#524 and w3c/html-aam#531
pulling over the commented filed by @benbeaudry in the original issue related to the html label element:
This is invalid in the world of UIA. UIA expects UIA_TextControlTypeId to be a leaf node. It effectively makes Narrator, a UIA-based AT, read both UIA_TextControlTypeId nodes independently. Instead, I suggest we map the element to UIA_GroupControlTypeId and continue mapping its descendants like they should be. We just performed that change in Chromium, and it leads to an improved user experience with UIA based ATs.
Currently roles like headings and paragraphs have a control type of text... but these are often not just text leaf nodes.
caption, as another example, is also mapped to text - but it has no mention of a localized control type, and it too is not always just text nodes.
So, filing this issue to verify what needs to be done.
Currently roles like headings and paragraphs have a control type of text...
I just confirmed that, in Chromium, we already expose paragraphs and headings as "UIA_GroupControlTypeId". Looks like we just need to modify the core-aam to reflect that!
But to be clear, there might plenty of issues with other roles. I'll need to do a thorough pass. Ping me if I forget.
roles that are currently mapped to control type text - unless specifically mentioned as not having a localized control type, the following roles also have a localized control type of their role name.
- caption (no localized control type)
- code
- deletion
- emphasis
- heading
- insertion
- paragraph (no localized control type)
- strong
- subscript (no localized control type - call out of styles used to expose isSubscript)
- superscript (no localized control type - call out of styles used to expose isSuperscript)
- term
- time (this one specifically has a note that indicates a variant of control type text would be created)
per Ben's previous comment, paragraph and heading at least do not match how UIA has adjusted.
I would submit that most of these should also map to group rather than text.
Also, it seems a miss that caption doesn't have a localized control type. Maybe that made sense when it was just for tables, but since it's reused for figure figcaptions, it should probably have a localized control type defined.
I just took a quick look at the chromium code and saw the following mappings for control type:
- caption (no localized control type) -> text
- code -> text
- deletion -> group
- emphasis -> text
- heading -> text
- insertion -> group
- paragraph (no localized control type) -> group
- strong -> text
- subscript (no localized control type - call out of styles used to expose isSubscript) -> text
- superscript (no localized control type - call out of styles used to expose isSuperscript) -> text
- term -> listitem
- time (this one specifically has a note that indicates a variant of control type text would be created) -> text
The following questions for @benbeaudry:
- you said above that role=heading maps to group, but it seems to me it maps to text, is there something other than AXPlatformNodeWin::GetUIARoleProperties that effects the control type over in chromium?
- I'm not sure I understand the chromium logic for computing localize control types, so it would be nice if you could confirm those should be added to the CORE-AAM mappings (as well as what they would be).
- Can you also confirm what these should all map to? Should they be group in every case where they are text?