# gpui: Expose accessibility identifiers to platform clients \(\#61926\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/cc053a4a6fa2fd0e8793201ed9099466af1be0b1)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: cc053a4a6fa2fd0e8793201ed9099466af1be0b1

Requested commit: cc053a4a6fa2fd0e8793201ed9099466af1be0b1

Commit: cc053a4a6fa2fd0e8793201ed9099466af1be0b1

Tree: 658c2effec8ee867be19d4b0fcac878f7ed6498c

Author: Chris Hynes

Committer: GitHub

## Message

```
gpui: Expose accessibility identifiers to platform clients (#61926)

# Objective

- Fixes #61925.
- GPUI already carries AccessKit author IDs through its platform
adapters, but applications cannot set one on an ordinary element.

## Solution

- Add `accessibility_id(...)` beside the other semantic builders.
- Store the value separately from GPUI's element ID and write it to
`Node::set_author_id`.
- Document that applications should keep the value stable and unique
within the accessibility tree.
- Document the platform mapping accurately: UIA `AutomationId` on
Windows, `AXIdentifier` on macOS, and AT-SPI `AccessibleId` on Linux
stacks whose deployed adapter exposes it.

## Testing

Exact candidate `d099c529`:

- `cargo fmt --all -- --check`
- `git diff --check`
- `cargo test -p gpui test_accessibility_id_builder_writes_author_id
--offline`: 1 passed, 218 filtered out

The test exercises the public builder and verifies that the author ID
reaches the AccessKit node. Validation is unit-level; this branch has
not run live platform UIA, AX, or AT-SPI end-to-end tests.

## Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments ; no unsafe block
added
- [x] The content adheres to Zed's UI standards ; no visual change
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Friday <260232009+buildfriday@users.noreply.github.com>
```

## Parents

- [c95e0c510518759a1db88892261e4152f396b549](https://git.cafe/gitcafe/zed/commit/c95e0c510518759a1db88892261e4152f396b549?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/cc053a4a6fa2fd0e8793201ed9099466af1be0b1?format=markdown)
