Skip to content

feat(locator): add description option to getByRole#40083

Open
Skn0tt wants to merge 4 commits intomicrosoft:mainfrom
Skn0tt:fix-39932
Open

feat(locator): add description option to getByRole#40083
Skn0tt wants to merge 4 commits intomicrosoft:mainfrom
Skn0tt:fix-39932

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented Apr 7, 2026

Fixes: #39932

@Skn0tt Skn0tt self-assigned this Apr 7, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test results for "MCP"

6442 passed, 383 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:118 › screencast › should capture static page `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:280 › screencast › should capture navigation `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-leaks.spec.ts:85 › click should not leak `@firefox-ubuntu-22.04-node20`

39220 passed, 846 skipped


Merge workflow run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be worth adding a test for an element with both aria-description and aria-describedby attributes?
When both attributes are set, and aria-describedby has a valid target element, then aria-description is ignored.

aria-describedby can also have multiple IDs.

It looks like if the aria-describedby has, for example, the same ID twice, then the accessible description will have the same text twice as well.

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

Successfully merging this pull request may close these issues.

[Feature]: Filtering getByRole locators using accessible descriptions

2 participants