[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:41:59 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 wildworks):
I'm wondering if it's necessary to override the browser's default focus
outline style in the first place. This is because I believe that the
browser's default focus style should meet accessibility standards. If we
want to avoid the dot style, how about just removing the focus style
itself from theme.json?
If we want to explicitly increase the thickness of the default focus
outline, we might have no choice but to load style.css only on the front
end or define a style like the one below.
{{{
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"styles": {
"elements": {
"button": {
":focus": {
"css": "outline-width:2px;outline-
style:solid"
}
}
},
"blocks": {
"core/navigation-link": {
"elements": {
"link": {
":focus": {
"css": "outline-
width:2px;outline-style:solid"
}
}
}
},
"core/comments": {
"css": "& input:focus { outline-width:2px
;outline-style:solid }"
}
}
}
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60535#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list