[wp-trac] [WordPress Trac] #60535: Twenty Twenty-Four: Unintended focus outline is applied in the Site Editor
WordPress Trac
noreply at wordpress.org
Wed Feb 14 05:59:18 UTC 2024
#60535: Twenty Twenty-Four: Unintended focus outline is applied in the Site Editor
--------------------------+---------------------------------
Reporter: wildworks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: | Focuses: accessibility, css
--------------------------+---------------------------------
Comment (by sabernhardt):
Considering that the purpose of the thicker style is to make focused
elements more visible, I would call the focus style in the site editor
more of a "happy accident" than a mistake.
However, it is inconsistent with the post editor, so it probably should be
changed.
The theme could check whether `.wp-site-blocks` also includes one of the
editor classes. The editor's class attribute (for now) includes `block-
editor-block-list__layout` and `edit-site-editor-canvas__block-list`.
{{{
.wp-site-blocks:not(.block-editor-block-list__layout) *:focus
}}}
Or if raising the specificity more is a problem, it could use `:where()`
{{{
.wp-site-blocks:where(:not(.block-editor-block-list__layout)) *:focus
}}}
If the editor's `content.css` is changed instead, `html .rich-text:focus`
would be enough to override Twenty Twenty-Four's style.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60535#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list