Repository navigation
material, widgets: Checkbox::semantic_label and Slider::label go; Semantics::label names every control - #3280
Merged
Merged
Conversation
…antics::label names every control Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4FAhVS5dwwxVx5vRGK
Owner
Author
|
The red Generated by Claude Code |
…-f2wym8 # Conflicts: # docs/gaps.md
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.
Requested by Vanya · project thread
Summary
Since #3269,
Semantics::labelaround 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'ssemanticLabel, which Flutter givesCheckboxalone) andflui-widgets'Slider::label(the assistive name only; Flutter'sSlider.labelis the value indicator's visible text, which this slider does not draw). Their users wrap the control inSemantics::new().label(…). ADR-0407 §2 now states the rule without the exception, and itsdocs/gaps.mdbullet is gone.Checked before removing
Slider::label(as Flutter'sSlider.labelis the value indicator's visible text): onmainits field is read in one place,crates/flui-widgets/src/controls/slider.rs:320, theSemantics::labelof 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, anddocs/gaps.mdowes 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 staysSemantics::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, whichTextField's decoration fills), the icon and imagesemantic_labels (content, not controls), the progress and activity indicators'labeland the scroll views'semantics_label(status and containers, not controls), andChip::delete_button_label(the delete button's visible tooltip).Verification
cargo fmt --all; clippy--all-targets -D warningson flui-widgets and flui-material;cargo check --workspace --all-targets --exclude flui-nativeperftargets included underFLUI_PERF_BASELINE=check(the checkbox inperf.rsmoves itsSemanticsfrom inside the control to around it: the same element, and the counts hold); the book'scatalogchapter compileschangelog.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::labeland 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;
rgfinds no user of either builder in code, docs or the book), with the automated review as the second reader.Notes
https://claude.ai/code/session_01EqfW4FAhVS5dwwxVx5vRGK
Generated by Claude Code