Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roles with UIA mappings for control type: text may be incorrect? #220

Open
scottaohara opened this issue Feb 7, 2024 · 4 comments · May be fixed by w3c/aria#2200
Open

Roles with UIA mappings for control type: text may be incorrect? #220

scottaohara opened this issue Feb 7, 2024 · 4 comments · May be fixed by w3c/aria#2200

Comments

@scottaohara
Copy link
Member

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.

@benbeaudry
Copy link
Contributor

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!

@benbeaudry
Copy link
Contributor

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.

@scottaohara
Copy link
Member Author

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.

scottaohara added a commit that referenced this issue Feb 7, 2024
closes #220

updates paragraph and heading mappings to match reality.

updates other uia control type mappings to move away from text, as these roles will often contain more than text leaf nodes.

other roles could be added to this PR, but will make those updates after discussion with the wg.
@spectranaut
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants