Repository navigation
fix(naked_ui): keep focus semantics on a disclosure with a semanticLabel - #317
Open
leoafarias wants to merge 2 commits into
Open
leoafarias wants to merge 2 commits into
leoafarias wants to merge 2 commits into
Conversation
A NakedDisclosure with an explicit semanticLabel wrapped the trigger in Semantics(excludeSemantics: true), which also dropped the trigger's focus action and focused state from the semantics tree. Exclude only the visual trigger content instead, so the label still replaces it while the surrounding focus semantics survive.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Give the focus contract its own test that performs the semantics focus action, keep the label test about replacement, wait a frame before reading the controlled panel so the test also holds on the web, and drop the activation test that could not detect this change. Clarify the comment.
This was referenced Oct 27, 2026
This branch has not been deployed
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.
Description
A
NakedDisclosurewith an explicitsemanticLabelwrapped its whole trigger inSemantics(excludeSemantics: true). That replaced the visual content's name as intended, but it also removed the trigger's focus action and focused state, so assistive technology could not report or move focus to a labelled disclosure. On the web the labelled trigger's button also had notabindexand never received DOM focus.Now only the visual trigger content is excluded. The replacement label and hint still apply to the button node, and the surrounding focus semantics stay intact. Disclosures without a
semanticLabelare unchanged.Validation
main(no focus action) and passes with the fix.naked_uitest suite: passed.dart analyze(no new issues), rootdart formatcheck,melos run ci:checks: passed.Related Issues
None.
Checklist
///).Breaking Change