-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add basic accname tests for shadow DOM #36541
Add basic accname tests for shadow DOM #36541
Conversation
Relevant PR on Note that I'm not solving the reflected element property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Nolan, thanks so much for writing these!! I know I also suggested you just write these "manual" tests, but I also just found out we do have infrastructure for writing automated tests of accname specifically, using webdriver and "get_computed_label", within WPT. There are some links from this issue: w3c/accname#174
Eventually we will translate all of these tests into using webdriver, so if you would prefer to land these tests as manual tests, these tests will suffice for now.
However, if you would like to write the first set of automated tests for accname+shadow DOM, you could look into how with the links above, and your tests will show up in wpt.fyi! :)
@spectranaut Thanks for the context! For the automated tests, it seems like it should be possible to write a script to bulk-convert the existing manual tests into automated tests? If that's the case, then I think for now I would prefer to write the manual tests. If not, then yes, maybe it would be worth the effort for me to start writing automated tests from scratch. |
There are no reviewers for this pull request. Please reach out on the chat room to get help with this. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual tests are not being maintained (or run, to my knowledge), but this could be re-written as an automated test in wpt/accname/name/comp_name_from_content.html once #39604 lands. Please update the ReadMe in that same dir if you're the one making the change.
@nolanlawson wrote:
Maybe there is a misplaced "not" in your comment above? "If that's [not] the case…" and "If [so] I don't think you could bulk convert the manual tests, as those rely on platform mappings that are not testable with browsers internals. For examples of what is testable with automation so far, review HEAD in wpt/accname, wpt/html-aam, and wpt/wai-aria-role. It's Of note, since the manual ATTA tests are not being maintained, I moved them into |
f3e7ee3
to
39f49b9
Compare
@cookiecrook I guess I was trying to say: "If we can automate the migration from manual to automated tests, then can we apply that to my PR?" But if there is no automated process, then no biggie – I ported my manual tests to automated tests in 39f49b9. I put the new tests under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall... Last nit to avoid name collision with future WPT.fyi results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Merge when you're ready, or I can if you prefer.
I'm not able to merge, so please go ahead! 🙂 |
Outdated comments from last year now resolved.
Adds basic tests for accname in shadow DOM. These are
manual tests, modeled after the existing testsautomated tests.Cases covered:
aria-labelledby
where labeller contains light and shadow DOM nodes.aria-label
on shadow DOM node.<slot>
s with slotted content and default slotted content.aria-label
on a<slot>
. (See How should<slot aria-label="foo">
be treated? w3c/accname#173)I don't have access to all the screenreaders listed, so I verified using the Firefox DevTools Accessibility pane (Firefox 105).Tested locally using./wpt run
.