Add top-layer element exclusion to focusgroup#1
Open
janewman wants to merge 2 commits into
Open
Conversation
When an element enters the document's top layer (e.g., a popover shown via showPopover(), a modal dialog, or a fullscreen element), exclude it and its shadow-including descendants from any ancestor focusgroup scope. Changes: - focusgroup scope: exclude top-layer elements and their shadow-including descendants (qualified so the owner's own focusgroup is unaffected) - focusgroup segment: top-layer subtrees create segment boundaries - entry element algorithm: last-focused-item is ineligible while its subtree is in the top layer - clearing conditions: exception preserves last-focused-item when scope exit is solely due to top-layer membership - new "Top layer interaction" section with normative prose and examples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the top-layer segment boundary clause with the focusgroup="none" clause by requiring the top-layer element to be sequentially focusable. This matches the Chromium implementation, which only creates segment boundaries for excluded subtrees containing focusable content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
When an element enters the document's top layer (e.g., a popover shown via
showPopover(), a modal<dialog>, or a fullscreen element), it and its shadow-including descendants are excluded from any ancestor focusgroup scope. This ensures arrow-key navigation in the ancestor focusgroup does not jump to content rendered in a separate layer.Changes
Modified definitions
focusgroupstartor the first sequentially focusable item.New section
focusgroup="radiogroup").Corresponding explainer change
Open UI
focusgroup_popoverbranch — adds "Top layer elements" subsection under Opting-out.Review notes
./build.sh --fast)dom-showPopover, etc.)aria-expandedadded to example trigger buttons