SIGN IN SIGN UP

button: Only expose toggled state on toggle buttons (#2637)

Closes #2635

### Description

Track whether the caller explicitly configured `.selected(...)`. Emit
AccessKit `Toggled::False` or `Toggled::True` only in that case.
Ordinary buttons retain their button role and press action without
advertising toggle state.

This changes only accessibility metadata. It does not change selected
styling or the public `.selected(...)` API.

### Screenshot

Not applicable. Rendering does not change.

### How to Test

Exact candidate `e4720a3b` on Rust 1.97.1:

- `cargo test -p gpui-component button --lib`: 9 passed
- `cargo test -p gpui-component`: 344 passed
- `cargo clippy -p gpui-component --all-targets -- -D warnings`
- story application compile: passed

The rendered-element regression writes the actual AccessKit node and
proves ordinary `None`, explicit false `Toggled::False`, and explicit
true `Toggled::True`.

### AI Assistance

The implementation and tests were AI-assisted by Friday. Chris Hynes
defined the behavior and owns the final review.

### Checklist

- [x] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [ ] Reviewed the changes in this PR and confirmed AI generated code
(If any) is accurate.
- [ ] Passed `cargo run` for story tests related to the changes. The
story application compiles; it has not been launched.
- [ ] Tested macOS, Windows and Linux platforms performance (if the
change is platform-specific). This is a cross-platform metadata change
with rendered-node unit coverage, not live platform E2E coverage.

---------

Co-authored-by: Friday <260232009+buildfriday@users.noreply.github.com>
Co-authored-by: Floyd Wang <gassnake999@gmail.com>
C
Chris Hynes committed
aaa92dc95ba566e80cfa7426be7e59315301635e
Parent: 8ee2865
Committed by GitHub <noreply@github.com> on 8/3/2026, 7:06:58 AM