Skip to content

Support querying elements with a given ARIA description - #32

Open
hovinen wants to merge 2 commits into
complete-aria-name-supportfrom
add-having-description
Open

hovinen wants to merge 2 commits into
complete-aria-name-supportfrom
add-having-description

Conversation

@hovinen

@hovinen hovinen commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

This is analogous to the Playwright feature.

This leverages DioxusLabs/blitz#1259, which implements the accessible description computation in Blitz.

@hovinen
hovinen added this pull request to stack #28 October 2, 2026 11:35
@hovinen
hovinen requested a review from ealmloff October 3, 2026 11:46
@hovinen hovinen self-assigned this Oct 3, 2026
Comment thread src/query/aria_tree.rs Outdated
@hovinen
hovinen force-pushed the add-having-description branch 2 times, most recently from 7fa4862 to 64f7797 Compare October 23, 2026 07:06
This is analogous to the
[Playwright feature](https://playwright.dev/docs/api/class-page#page-get-by-role-option-description).

The description is read from the node, where Blitz computes it from `aria-describedby`,
`aria-description`, and `title` as per the
[W3C specification](https://www.w3.org/TR/accname-1.2/#mapping_additional_nd_description). Like the
accessible name, it is matched as an `Option<&str>` so that elements with an empty description and
elements without one can be told apart.

This depends on the Blitz branch which provides this behavior.
Add `having_no_description` to match elements for which the accessible description is absent, as
`having_no_name` does for the accessible name.
@hovinen
hovinen force-pushed the add-having-description branch from 64f7797 to e3d6640 Compare October 24, 2026 13:39
@hovinen
hovinen removed this pull request from stack #28 October 24, 2026 13:44
@hovinen
hovinen added this pull request to stack #40 October 24, 2026 13:44
@hovinen
hovinen removed this pull request from stack #40 October 24, 2026 13:54
@hovinen
hovinen changed the base branch from use-matcher-in-having-name to complete-aria-name-support October 24, 2026 13:54
@hovinen
hovinen added this pull request to stack #42 October 24, 2026 13:54
@hovinen
hovinen removed this pull request from stack #42 October 24, 2026 13:57
@hovinen
hovinen added this pull request to stack #45 October 24, 2026 13:57
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.

2 participants