Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement correct focus behavior for popovers #36827

Merged
merged 1 commit into from Nov 10, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 4, 2022

This implements the focus behavior described in [1], which:

  1. Moves focus from an invoking element to its invoked popover,
    regardless of where in the DOM that popover lives.
  2. Moves focus back to the next focusable element after the
    invoking element once focus leaves the invoked popover.
  3. Skips over an open invoked popover otherwise.

The logic follows very closely the case of slotted light DOM content,
for which focus moves from the shadow root content to the slotted
light DOM content and back.

[1] https://github.com/w3c/html-aam/wiki/HTML-Popup-Attribute-A11y-Proposal-%28manual-and-auto%29

Bug: 1307772
Change-Id: Ic12441fc3b8d2f1c405bf912234dd24e4b05dc69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4006714
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069375}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Implement "focus fixup" for popovers Implement correct focus behavior for popovers Nov 4, 2022
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4006714 branch 2 times, most recently from d9febbe to 3332918 Compare November 7, 2022 23:02
This implements the focus behavior described in [1], which:
 1. Moves focus from an invoking element to its invoked popover,
    regardless of where in the DOM that popover lives.
 2. Moves focus back to the next focusable element after the
    invoking element once focus leaves the invoked popover.
 3. Skips over an open invoked popover otherwise.

The logic follows very closely the case of slotted light DOM content,
for which focus moves from the shadow root content to the slotted
light DOM content and back.

[1] https://github.com/w3c/html-aam/wiki/HTML-Popup-Attribute-A11y-Proposal-%28manual-and-auto%29

Bug: 1307772
Change-Id: Ic12441fc3b8d2f1c405bf912234dd24e4b05dc69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4006714
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069375}
@WeizhongX
Copy link
Contributor

@KyleJu @DanielRyanSmith can you help admin merge this PR? Looks like all tests have passed, but the exporter says it can not be merged, might due to the wpt-decision-task did not finish.

2022-11-10 11:04:35,217 - In-flight PR found: #36827
2022-11-10 11:04:35,217 - Attempting to merge...
2022-11-10 11:04:36,269 - Could not merge PR.

@WeizhongX WeizhongX closed this Nov 10, 2022
auto-merge was automatically disabled November 10, 2022 20:08

Pull request was closed

@WeizhongX WeizhongX reopened this Nov 10, 2022
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit af4dd28 into master Nov 10, 2022
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-4006714 branch November 10, 2022 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants