You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Description\n\nNakedDisclosure currently exposes expanded state but not the semantic relationship between its trigger and panel. This change gives each disclosure state a private, stable panel identifier and sets the trigger controlsNodes relationship only while expanded, matching the panel presence in the semantics tree.\n\nAfter reopening, the relationship is deferred until the remounted panel has registered in the semantics tree. This makes Flutter web resolve aria-controls to the recreated DOM semantics node instead of retaining a stale target or dropping the relationship because the target was not ready.\n\nNo public API is added or changed. Visible-label derivation, explicit label replacement, disabled behavior, keyboard interaction, focus restoration, and animated closing remain unchanged.\n\nThe disclosure accessibility documentation now describes the relationship lifecycle.\n\n## Related Issues\n\nNone. This is an upstream prerequisite for the Remix Disclosure integration.\n\n---\n\n## Checklist\n\n- [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors.\n- [x] I have updated or added relevant documentation.\n- [x] I am prepared to follow up on review comments in a timely manner.\n\n## Breaking Change\n\n- [ ] Yes, this is a breaking change.\n- [x] No, this is not a breaking change.\n\n## Verification\n\n- dart format --set-exit-if-changed .\n- flutter analyze\n- flutter test packages/naked_ui/test\n- flutter test packages/example/test\n- flutter pub publish --dry-run (0 warnings)\n- Remix Widgetbook on Flutter web using this branch: initial aria-controls target exists, Enter collapse removes the relationship, and Space reopen resolves to the recreated panel.
The reason will be displayed to describe this comment to others. Learn more.
Browser validation from Remix found a lifecycle edge case that the widget semantics tests did not catch.\n\nObserved against e071ad9 in a fresh Flutter web session:\n- Initially expanded: aria-controls referenced the current panel DOM semantics node.\n- After collapsing with Enter: aria-controls was removed and the panel semantics node disappeared.\n- After reopening with Space: aria-controls still referenced the old removed DOM node rather than the recreated panel.\n\nThe intermediate 3306edb approach avoided the stale ID but left aria-controls absent after reopening, so it should be treated as superseded rather than an independently valid fix.\n\nThe current 1769db7 approach defers restoring controlsNodes until one frame after the panel remounts. Analyzer and the full naked_ui test suite pass, but final fresh-session browser validation of this head was interrupted and is not complete.\n\nPlease review the timing/lifecycle approach and validate this acceptance condition before merge:\n\n1. Open expanded: aria-controls is non-null and document.getElementById(ariaControls) is the visible panel semantics container.\n2. Collapse with Enter: aria-controls is null and the panel target is absent.\n3. Reopen with Space: aria-controls is non-null and resolves to the newly created panel DOM node.\n4. Repeat the cycle and verify the relationship remains valid.\n\nA web regression test would be ideal if the existing integration-test setup can inspect the generated semantics DOM.
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
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\n\nNakedDisclosure currently exposes expanded state but not the semantic relationship between its trigger and panel. This change gives each disclosure state a private, stable panel identifier and sets the trigger controlsNodes relationship only while expanded, matching the panel presence in the semantics tree.\n\nAfter reopening, the relationship is deferred until the remounted panel has registered in the semantics tree. This makes Flutter web resolve aria-controls to the recreated DOM semantics node instead of retaining a stale target or dropping the relationship because the target was not ready.\n\nNo public API is added or changed. Visible-label derivation, explicit label replacement, disabled behavior, keyboard interaction, focus restoration, and animated closing remain unchanged.\n\nThe disclosure accessibility documentation now describes the relationship lifecycle.\n\n## Related Issues\n\nNone. This is an upstream prerequisite for the Remix Disclosure integration.\n\n---\n\n## Checklist\n\n- [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors.\n- [x] I have updated or added relevant documentation.\n- [x] I am prepared to follow up on review comments in a timely manner.\n\n## Breaking Change\n\n- [ ] Yes, this is a breaking change.\n- [x] No, this is not a breaking change.\n\n## Verification\n\n- dart format --set-exit-if-changed .\n- flutter analyze\n- flutter test packages/naked_ui/test\n- flutter test packages/example/test\n- flutter pub publish --dry-run (0 warnings)\n- Remix Widgetbook on Flutter web using this branch: initial aria-controls target exists, Enter collapse removes the relationship, and Space reopen resolves to the recreated panel.