elements/div: add an aria_url passthrough - #4
Open
francois-unity wants to merge 1 commit into
Open
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
francois-unity
marked this pull request as ready for review
October 1, 2026 14:31
marieletellier
approved these changes
Oct 1, 2026
marieletellier
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. aria_url follows the sibling aria_* setters: stored on AriaProperties.url and written with node.set_url(...) in write_a11y_info, and the test asserts node.url(). One commit ahead and zero behind unity/a11y-automation, so fast-forward is possible.
Non-blocking:
set_urlruns for any role, not justLink. Consistent with the other string props, just noting it.- The red CI isn't from this PR:
crates/gpui_media/build.rsnamesbindgen::at compile time whileac9f1efdcfmovedbindgento a macOS-only build-dependency, so Linux/Windows fail with E0433.build.rsis byte-identical at base and head. The base branch needs its own fix (cfg-gate thebindgenuse inbuild.rs).
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].