Skip to content

elements/div: add an aria_url passthrough - #4

Draft
francois-unity wants to merge 1 commit into
unity/a11y-automationfrom
unity/aria-url
Draft

francois-unity wants to merge 1 commit into
unity/a11y-automationfrom
unity/aria-url

Conversation

@francois-unity

Copy link
Copy Markdown
Collaborator

Adds .aria_url(...) beside the other aria_* builders, so an element can publish the URL it links to as the AccessKit url property (what a web page exposes for an <a href>).

  • AriaProperties gains url: Option<SharedString>.
  • write_a11y_info calls node.set_url(...) when it is set, next to the other string properties.
  • Window::debug_a11y_tree_json already prints url, 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 reports url: null, so neither a screen reader nor an automation client can read the target. The Hub’s design-system Link sets it from its href port 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’s url.
  • The Unity Hub branch that consumes it reads the URL back out of a real forced tree (Window::a11y_tree) in a headless #[gpui::test].

@francois-unity francois-unity self-assigned this Sep 29, 2026
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.
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.

1 participant