Toolbar: Don't hide admin bar text labels from screen readers on small screens.

This change replaces `display: none` with `screen-reader-text` styles so the text labels are available for screen readers on small screens.

Props legendusmaximus, sabernhardt, konradyoast.
Fixes #54895.

Built from https://develop.svn.wordpress.org/trunk@52674


git-svn-id: http://core.svn.wordpress.org/trunk@52263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-02-04 12:56:00 +00:00
parent 2d20fd7cc1
commit e175e8aa0a
5 changed files with 25 additions and 5 deletions

View File

@ -796,7 +796,17 @@ html:lang(he-il) .rtl #wpadminbar * {
} }
#wpadminbar .ab-label { #wpadminbar .ab-label {
display: none; border: 0;
clip: rect(1px, 1px, 1px, 1px);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
} }
#wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li:hover > .ab-sub-wrapper,

File diff suppressed because one or more lines are too long

View File

@ -795,7 +795,17 @@ html:lang(he-il) .rtl #wpadminbar * {
} }
#wpadminbar .ab-label { #wpadminbar .ab-label {
display: none; border: 0;
clip: rect(1px, 1px, 1px, 1px);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
} }
#wpadminbar .menupop li:hover > .ab-sub-wrapper, #wpadminbar .menupop li:hover > .ab-sub-wrapper,

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.0-alpha-52673'; $wp_version = '6.0-alpha-52674';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.