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 dialog initial focus proposal #36831

Merged
merged 1 commit into from
Feb 1, 2023

Commits on Feb 1, 2023

  1. Implement dialog initial focus proposal

    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 <[email protected]>
    Reviewed-by: Mason Freed <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#1100024}
    josepharhar authored and chromium-wpt-export-bot committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    4a7eb16 View commit details
    Browse the repository at this point in the history