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

audit rule for role="none" and role="presentation" on <table> and <ul> #222

Open
spectranaut opened this issue Feb 12, 2024 · 1 comment
Assignees

Comments

@spectranaut
Copy link
Contributor

spectranaut commented Feb 12, 2024

We have some special logic for handling role="none" on elements which have allowed accessible children: https://w3c.github.io/core-aam/#role-map-none

For ATK/ATSPI says:

For objects that have specified allowed accessibility children (e.g., a grid with gridcell children, a list with listitem children), and the descendant is in the accessibility tree, expose it as ROLE_SECTION. user agents SHOULD prune empty descendants from the accessibility tree.

Does this mean, that given the following html:

<ul role=none>
  <li>list item one</li>
  <li>list item two</li>
</ul>

The ul in this case should be mapped to an element with ROLE_SECTION? When testing right now (in chome on linux), it is pruned.

There is a core-aam test for this, but the test tests the child li element -- I guess that it is testing the children because the the ul is expected to be pruned: https://github.com/web-platform-tests/wpt/blob/master/core-aam/presentation_used_on_ul_element_with_li_children-manual.html

I'll test on the other platforms later.

@spectranaut spectranaut self-assigned this Feb 12, 2024
@jnurthen jnurthen changed the title audit rule for role="none" and role="presentational" on <table> and <ul> audit rule for role="none" and role="presentation" on <table> and <ul> Feb 15, 2024
@smhigley
Copy link
Contributor

I think the tests on the child li elements are correct -- based on that (rather ambiguous) wording, I think it's describing the following behavior and expected output:

<ul role=none>
  <li>list item one</li>
  <li>list item two</li>
  <li></li> <!-- empty child -->
</ul>

output tree for ATK/SPI:

- (ignored)
   - ROLE_SECTION
   - ROLE_SECTION

Does that look right to you? I believe the "it" in expose it as ROLE_SECTION is referring to the child and not the parent.

That said, I've noticed AX API has the following inconsistency: Core AAM says to map "it" to AXGroup, but the <ul role=none> is pruned and the <li> elements are exposed as AXStaticText

UIA's description appears to match the mapping -- both ul and all li elements are pruned, and the content of the li elements are exposed as Text nodes.

I wasn't able to test IA2 or ATK/AT-SPI -- those also seem worth checking whether they match what's in Core AAM.

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

No branches or pull requests

2 participants