Skip to content

Implement dialog initial focus proposal#36831

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-3984630
Feb 1, 2023
Merged

Implement dialog initial focus proposal#36831
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-3984630

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

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

This has been discussed here:
whatwg/html#4184
whatwg/html#8199

The gist of the changes are:

  1. Make the dialog focusing steps look at keyboard focusable elements
    instead of any focusable element.
  2. Make the dialog element itself get focus if it has the autofocus
    attribute set.
  3. Make the dialog element itself get focus as a fallback instead of
    focus being "reset" to the body element.

This patch also adds "outline:none" to several WPTs because this patch
causes the dialog element to become initially focused in some cases and
get a focus ring.

I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/CEL3wWHrTAQ

Fixed: 1193482
Change-Id: I1fee5981f72039a4467cbb35b2317832dd31bbea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984630
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100024}

Copy link
Copy Markdown
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 force-pushed the chromium-export-cl-3984630 branch 2 times, most recently from 14b3a2f to 145f7f6 Compare December 15, 2022 23:46
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-3984630 branch 3 times, most recently from 13408ca to 7c3e510 Compare January 17, 2023 18:52
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-3984630 branch 2 times, most recently from 16bdc22 to 346a0f0 Compare January 19, 2023 20:45
This has been discussed here:
whatwg/html#4184
whatwg/html#8199

The gist of the changes are:
1. Make the dialog focusing steps look at keyboard focusable elements
   instead of any focusable element.
2. Make the dialog element itself get focus if it has the autofocus
   attribute set.
3. Make the dialog element itself get focus as a fallback instead of
   focus being "reset" to the body element.

This patch also adds "outline:none" to several WPTs because this patch
causes the dialog element to become initially focused in some cases and
get a focus ring.

I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/CEL3wWHrTAQ

Fixed: 1193482
Change-Id: I1fee5981f72039a4467cbb35b2317832dd31bbea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984630
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100024}
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.

4 participants