-
Notifications
You must be signed in to change notification settings - Fork 46
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
Specify a locator for accessible role #624
Conversation
@@ -3076,6 +3085,41 @@ and |session|: | |||
|
|||
</div> | |||
|
|||
<div algorithm="locate nodes using role"> | |||
To <dfn>locate nodes using role</dfn> with given |context nodes|, |selector|, |
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.
Puppeteer would currently need both accessible name and role as an input to the query. Would it make sense to include both into this locator?
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.
I believe the plan is to specify a distinct locator for accessible name.
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.
In WebDriver classic we as well have two different commands Get Computed Role
and Get Computed Label
.
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.
Those are different though: they are for getting the values and not for searching.
I think it'd would be beneficial to have a single locator to search by a11y attributes (so it's easier to extend the list of attributes). Currently, the locators are not composable so the client like Puppeteer would be required to query twice and merge results client-side.
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.
Related WICG/aom#197
@jugglinmike should I take over this PR? |
I have opened a draft based on this PR #660 (we will discuss it internally first) |
I've referenced the definition of "role" in WAI-ARIA because that's how WebDriver explains the computation of a role given an element, but computedrole from CORE-AAM seems more appropriate.
Preview | Diff