elements/div: add an aria_url passthrough - #4
Draft
francois-unity wants to merge 1 commit into
Draft
francois-unity wants to merge 1 commit into
francois-unity wants to merge 1 commit into
Conversation
chris-addison
force-pushed
the
unity/a11y-automation
branch
from
September 30, 2026 04:30
512f0ab to
12a8dc6
Compare
Lets an element publish the URL it links to as the AccessKit `url` property, which is what a web page exposes for an `<a href>`. Like the other `aria_*` passthroughs it only describes the element: opening the URL stays with the element’s own click handler.
chris-addison
force-pushed
the
unity/aria-url
branch
from
September 30, 2026 04:38
a9c4c39 to
f475fed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.aria_url(...)beside the otheraria_*builders, so an element can publish the URL it links to as the AccessKiturlproperty (what a web page exposes for an<a href>).AriaPropertiesgainsurl: Option<SharedString>.write_a11y_infocallsnode.set_url(...)when it is set, next to the other string properties.Window::debug_a11y_tree_jsonalready printsurl, so the dump shows it with no change there.Like the other passthroughs it only describes the element: a click still runs whatever the element handles.
Why: the Unity Hub’s links are gpui divs with
Role::Link, and every one of them reportsurl: null, so neither a screen reader nor an automation client can read the target. The Hub’s design-systemLinksets it from itshrefport once this lands.How to test
cargo test -p gpui-ce --lib -- elements::div::tests::test_aria_url_builder_writes_url: the builder writes the node’surl.Window::a11y_tree) in a headless#[gpui::test].