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

new synonym role tests #38941

Merged
merged 4 commits into from
Apr 7, 2023

Conversation

cookiecrook
Copy link
Contributor

@cookiecrook
Copy link
Contributor Author

w3c/core-aam#166

@cookiecrook
Copy link
Contributor Author

Discussion in w3c/core-aam#166 is settling that the assertions in this PR are good, but I'll modify the file to use ARIAUtils once #38925 lands.

@cookiecrook
Copy link
Contributor Author

cookiecrook commented Mar 29, 2023

@zcorpan This patch includes expected (different) failures in both Chromium and WebKit. The WebKit failures are resolved in the nightlies with 224617, but not yet in STP. Chromium bug is 1428763.

@cookiecrook cookiecrook requested a review from spectranaut April 4, 2023 00:55
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From everything i saw you haven't been including html implicit role tests, I feel like you shouldn't introduce an implicit html role test in here.

wai-aria/role/synonym-roles.html Outdated Show resolved Hide resolved
@cookiecrook cookiecrook requested a review from spectranaut April 7, 2023 03:34
@cookiecrook cookiecrook merged commit 0b1a0be into web-platform-tests:master Apr 7, 2023
@cookiecrook cookiecrook deleted the synonym-roles branch April 7, 2023 21:12
cookiecrook added a commit to cookiecrook/wpt that referenced this pull request Apr 8, 2023
Asserts computedrole for ARIA Core-AAM role synonyms
 - image/img
 - none/presentation
 - list/directory

Related Issues:
 - web-platform-tests/interop-accessibility#10
 - w3c/core-aam#166

Supporting Spec Change:
 - w3c/core-aam#167

Implementation Changes:
 - WebKit: https://webkit.org/b/224617
 - Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1428763

Reviewed By:
 - spectranaut: Valerie Young (Igalia)
<!-- spec resolution https://github.com/w3c/core-aam/issues/166 -->

<div role="none" id="none" data-expectedrole="none" data-testname="none role == computedrole none" class="ex">x</div><!-- preferred -->
<div role="presentation" id="presentation" data-expectedrole="none" data-testname="synonym presentation role == computedrole none" class="ex">x</div><!-- synonym -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires browsers to return a computed role for this element even though it's not in the a11y tree because role="presentation"/"none" excludes it from the tree. We can fudge this with the DOM, but this seems wrong given that we're trying to test the browser's a11y implementation. In general, what are the expectations for computedRole for nodes which aren't in the a11y tree?

Copy link
Contributor Author

@cookiecrook cookiecrook Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "none" is the expected return value for these, whether they are not in the tree or whether they are ignored for some other reason. In either case, they have no role, right? But to be clear, I'm definitely open to rehashing that assumption if that doesn't work for Gecko.

Here are some related issues where I suspect you'll have an opinion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gecko currently returns null, but I can change that to anything: "", "none", whatever. However, it seems to me that there is a subtle difference between role="none" (one very specific way of removing an element from the a11y tree) vs the non-existence of an element in the a11y tree for one of several reasons (role="none", hidden, aria-hidden, ...). Could "none" lead people to think that this is specifically about role="none", when in reality, aria-hidden will return "none" as well?

That said, I don't want to bikeshed too much here. If WebKit and Chromium are happy with "none" for all cases of a11y non-existence, I can just change Gecko's WebDriver implementation to return "none" and move on.

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

Successfully merging this pull request may close these issues.

Need role synonym tests for image/img and none/presentation
5 participants