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

Specify a locator for accessible role #624

Closed
wants to merge 1 commit into from

Conversation

jugglinmike
Copy link
Contributor

@jugglinmike jugglinmike commented Dec 19, 2023

@whimboo whimboo added enhancement New feature or request module-browsingContext Browsing Context module labels Dec 19, 2023
@@ -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|,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@OrKoN OrKoN Jan 4, 2024

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Related WICG/aom#197

@OrKoN
Copy link
Contributor

OrKoN commented Jan 24, 2024

@jugglinmike should I take over this PR?

@OrKoN
Copy link
Contributor

OrKoN commented Feb 13, 2024

I have opened a draft based on this PR #660 (we will discuss it internally first)

@jgraham jgraham closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module-browsingContext Browsing Context module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants