Accessibility: Hide the Toolbar sub-menu CSS generated icons from assistive technologies.

CSS generated content is rendered for speech output. When it's not meant to be announced by assistive technologies, for example with font icons, special care should be used to hide it. At the moment, the only reliable way to do this is making use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.


git-svn-id: https://develop.svn.wordpress.org/trunk@44793 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2019-03-04 22:45:24 +00:00
parent 4a09766cb0
commit e8fa2d66d0
2 changed files with 18 additions and 8 deletions

View File

@@ -231,7 +231,8 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
#wpadminbar .ab-icon,
#wpadminbar .ab-item:before {
#wpadminbar .ab-item:before,
.wp-admin-bar-arrow {
position: relative;
float: left;
font: normal 20px/1 dashicons;
@@ -308,7 +309,7 @@ html:lang(he-il) .rtl #wpadminbar * {
color: #00b9eb;
}
#wpadminbar .menupop .menupop > .ab-item:before,
#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before,
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before {
position: absolute;
font: normal 17px/1 dashicons;
@@ -322,9 +323,10 @@ html:lang(he-il) .rtl #wpadminbar * {
padding-right: 2em;
}
#wpadminbar .menupop .menupop > .ab-item:before {
#wpadminbar .menupop .menupop > .ab-item .wp-admin-bar-arrow:before {
top: 1px;
right: 4px;
right: 10px;
padding: 4px 0;
content: "\f139";
color: inherit;
}
@@ -334,7 +336,7 @@ html:lang(he-il) .rtl #wpadminbar * {
padding-right: 1em;
}
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before {
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item .wp-admin-bar-arrow:before {
top: 1px;
left: 6px;
content: "\f141";