Skip to content

material, widgets: Checkbox::semantic_label and Slider::label go; Semantics::label names every control - #3280

Merged
vanyastaff merged 3 commits into
mainfrom
claude/project-thread-f2wym8
Nov 30, 2026
Merged

vanyastaff merged 3 commits into
mainfrom
claude/project-thread-f2wym8

Conversation

@vanyastaff

@vanyastaff vanyastaff commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Requested by Vanya · project thread

Summary

Since #3269, Semantics::label around any control names the control's own node (ADR-0407 §2), so the builders that only set a control's accessible name are a second way to do one thing. This removes the two left: Checkbox::semantic_label (Flutter's semanticLabel, which Flutter gives Checkbox alone) and flui-widgets' Slider::label (the assistive name only; Flutter's Slider.label is the value indicator's visible text, which this slider does not draw). Their users wrap the control in Semantics::new().label(…). ADR-0407 §2 now states the rule without the exception, and its docs/gaps.md bullet is gone.

Checked before removing Slider::label (as Flutter's Slider.label is the value indicator's visible text): on main its field is read in one place, crates/flui-widgets/src/controls/slider.rs:320, the Semantics::label of the slider's node. The slider paints a track and a thumb only, no catalog (flui-widgets, flui-material, flui-cupertino) has a value indicator, and docs/gaps.md owes none, so nothing visible depends on it. A slider that draws a value indicator later takes its visible text under Flutter's name, label, apart from the node's name, which stays Semantics::label.

Kept, because they are not name-only builders on a control: Disclosure::label (replaces the name the header's content gives), EditableText::semantic_label (the field's channel for its visible label, which TextField's decoration fills), the icon and image semantic_labels (content, not controls), the progress and activity indicators' label and the scroll views' semantics_label (status and containers, not controls), and Chip::delete_button_label (the delete button's visible tooltip).

Verification

  • cargo fmt --all; clippy --all-targets -D warnings on flui-widgets and flui-material; cargo check --workspace --all-targets --exclude flui-native
  • Tests of flui-widgets and flui-material, their perf targets included under FLUI_PERF_BASELINE=check (the checkbox in perf.rs moves its Semantics from inside the control to around it: the same element, and the counts hold); the book's catalog chapter compiles
  • changelog.d/claude-project-thread-f2wym8.md (Removed)

Expectations changed

None: the tests that named a checkbox or a slider by its builder name it with Semantics::label and assert the same node.

Review

A mechanical removal on the rule #3269 settled and its review read; read by the author against "Before each push" (no user code, no new form; rg finds no user of either builder in code, docs or the book), with the automated review as the second reader.

Notes

  • Not run on device platforms: no platform code changes.

https://claude.ai/code/session_01EqfW4FAhVS5dwwxVx5vRGK


Generated by Claude Code

…antics::label names every control

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqfW4FAhVS5dwwxVx5vRGK
@vanyastaff vanyastaff self-assigned this Nov 30, 2026

Copy link
Copy Markdown
Owner Author

The red test job on 77419c3 is flui-driver's x11_desktop::the_server_captures_the_apps_window_alone: the X server's capture of the app's window stayed one flat colour for 15 s after the app settled (crates/flui-driver/tests/x11_desktop.rs:418). This diff does not touch the driver, the X11 host or the engine. It removes two semantics-only builders. The same test failed once on #3269's 29ff2a8 and passed on its other heads, and it passed on other branches' runs over the same hours. I can't re-run the job (403), so I merged main (63c8910) to run CI again on 712d3c4. If it fails again, I'll look into the X11 capture path separately instead of calling it a flake.


Generated by Claude Code

@vanyastaff
vanyastaff merged commit 186c92e into main Nov 30, 2026
22 checks passed
@vanyastaff
vanyastaff deleted the claude/project-thread-f2wym8 branch November 30, 2026 23:00
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.

2 participants