Toolbar: Prevent false positive on automated contrast testing.

The non-focused state of the `.screen-reader-shortcut` element in the admin bar fails contrast tests. This has no real-world consequences, but raises false positives in some automated testing tools. This fix is largely so people using automated testing will not raise false positives.

Props sabernhardt, afercia, robinwpdeveloper, re_enter_rupok.
Fixes #56789.
Built from https://develop.svn.wordpress.org/trunk@55307


git-svn-id: http://core.svn.wordpress.org/trunk@54840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2023-02-11 17:39:20 +00:00
parent 5826e74499
commit 10a1594b64
9 changed files with 29 additions and 21 deletions

View File

@ -142,21 +142,24 @@
.screen-reader-shortcut {
position: absolute;
top: -1000em;
}
.screen-reader-shortcut:focus {
right: 6px;
top: -25px;
height: auto;
width: auto;
display: block;
font-size: 14px;
font-weight: 600;
padding: 15px 23px 14px;
/* Background and color set to prevent false positives in automated accessibility tests. */
background: #f0f0f1;
color: #2271b1;
z-index: 100000;
line-height: normal;
}
.screen-reader-shortcut:focus {
top: -25px;
/* Overrides a:focus in the admin. See ticket #56789. */
color: #2271b1;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
text-decoration: none;
/* Only visible in Windows High Contrast mode */

File diff suppressed because one or more lines are too long

View File

@ -141,21 +141,24 @@
.screen-reader-shortcut {
position: absolute;
top: -1000em;
}
.screen-reader-shortcut:focus {
left: 6px;
top: -25px;
height: auto;
width: auto;
display: block;
font-size: 14px;
font-weight: 600;
padding: 15px 23px 14px;
/* Background and color set to prevent false positives in automated accessibility tests. */
background: #f0f0f1;
color: #2271b1;
z-index: 100000;
line-height: normal;
}
.screen-reader-shortcut:focus {
top: -25px;
/* Overrides a:focus in the admin. See ticket #56789. */
color: #2271b1;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
text-decoration: none;
/* Only visible in Windows High Contrast mode */

File diff suppressed because one or more lines are too long

View File

@ -720,11 +720,7 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar .screen-reader-shortcut {
position: absolute;
top: -1000em;
}
#wpadminbar .screen-reader-shortcut:focus {
right: 6px;
top: 7px;
height: auto;
width: auto;
display: block;
@ -736,6 +732,11 @@ html:lang(he-il) .rtl #wpadminbar * {
z-index: 100000;
line-height: normal;
text-decoration: none;
}
#wpadminbar .screen-reader-shortcut:focus {
top: 7px;
background: #f0f0f1;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
}

File diff suppressed because one or more lines are too long

View File

@ -719,11 +719,7 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar .screen-reader-shortcut {
position: absolute;
top: -1000em;
}
#wpadminbar .screen-reader-shortcut:focus {
left: 6px;
top: 7px;
height: auto;
width: auto;
display: block;
@ -735,6 +731,11 @@ html:lang(he-il) .rtl #wpadminbar * {
z-index: 100000;
line-height: normal;
text-decoration: none;
}
#wpadminbar .screen-reader-shortcut:focus {
top: 7px;
background: #f0f0f1;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
}

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta1-55306';
$wp_version = '6.2-beta1-55307';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.