Repository navigation
button: Expose accessible names in the script API - #3665
Merged
Merged
Conversation
huacnlee
marked this pull request as ready for review
October 24, 2026 05:05
huacnlee
enabled auto-merge (squash)
October 24, 2026 05:05
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.
Button.new("save").label("Save").accessibility_label("Save the current document") currently throws even though Rust Button supports the builder and the generated types permit it. Register the string method and replay it into the real Button builder.
This is limited to Button. Refs #3662; other components and inherited bridge APIs remain outside this change.
Public API
gpui-shell (JavaScript module
gpui-component)ButtonElement.accessibility_label(accessibility_label: string): ButtonElement— sets the accessible name independently of the visible label. The descriptor now supplies the concrete generated TypeScript declaration and validates the runtime argument.Validation
cargo fmt --all --check,git diff --check, andnode --check crates/shell/tests/types/run.mjs.6cf4a75408a08e347e8b4825f260f95e6ab67410: GPUI Shell Components passed, including 939 library tests (1 ignored), all 122 integration tests, the mounted accessible-name/click regression, and generated TypeScript contracts with runtime argument rejection checks.GPUI_A11Y_ACTIVE=1test support in an isolated subprocess; non-Fast builds retain script-call and click coverage.glib-2.0development files. CI supplies the executed integration/type results above.ecd2c8ff42439b73b87a238d02db10fe20376740); the same dependency failure prevented a behavioral negative control./var/lib/apt/lists/partial; no sudo is available. Exact-head CI run 40049044700 is terminal: 17 jobs report success; Checks fails on the pre-existing Portugueseatual/Atualtypo false positives in unchangedcrates/component/locales/ui.yml:646,661,676. Shell Core (including Clippy) passed.llrt_pure_modules_execute_inside_the_shell_runtime(incomplete deflate stream),every_fs_call_settles_through_a_promise(round-trip mismatch), andwebsocket_reads_and_writes_text_and_binary_messages(empty binary message). All three have identical diagnostics in the base-main job atecd2c8ff42439b73b87a238d02db10fe20376740; they are outside this Button change. The overall run is not green.Review and assistance
Implemented with ChatGPT assistance on behalf of @huacnlee. Independently reviewed by a separate ChatGPT agent on behalf of @huacnlee at commit
6cf4a75408a08e347e8b4825f260f95e6ab67410: no remaining source-review findings. This is an independent AI source review, not a human review; executed CI evidence is listed above.