Skip to content

Commit 15fbf63

Browse files
committed
Hide or set empty alternatives for pseudo elements
1 parent 57c1af7 commit 15fbf63

29 files changed

+524
-524
lines changed

src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5056,7 +5056,7 @@ var inlite = (function (domGlobals) {
50565056
}
50575057
icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
50585058
ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
5059-
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '</div>';
5059+
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + '</button>' + '</div>';
50605060
},
50615061
bindStates: function () {
50625062
var self = this, $ = self.$, textCls = self.classPrefix + 'txt';
@@ -5716,7 +5716,7 @@ var inlite = (function (domGlobals) {
57165716
self.classes.add('btn-has-text');
57175717
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
57185718
}
5719-
return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
5719+
return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
57205720
},
57215721
postRender: function () {
57225722
var self = this, onClickHandler = self.settings.onclick;
@@ -8560,7 +8560,7 @@ var inlite = (function (domGlobals) {
85608560
}
85618561
icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
85628562
self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button');
8563-
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
8563+
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
85648564
},
85658565
postRender: function () {
85668566
var self = this;
@@ -9068,7 +9068,7 @@ var inlite = (function (domGlobals) {
90689068
shortcut = convertShortcut(shortcut);
90699069
}
90709070
icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
9071-
iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + '></i>\xA0' : '';
9071+
iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>\xA0' : '';
90729072
text = boldMatches(self.encode(markMatches(text)));
90739073
url = boldMatches(self.encode(markMatches(url)));
90749074
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' + iconHtml + (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') + (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') + (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') + (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') + '</div>';
@@ -9436,7 +9436,7 @@ var inlite = (function (domGlobals) {
94369436
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
94379437
}
94389438
ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
9439-
return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
9439+
return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
94409440
},
94419441
postRender: function () {
94429442
var self = this, onClickHandler = self.settings.onclick;

src/js/_enqueues/vendor/tinymce/themes/modern/theme.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4881,7 +4881,7 @@ var modern = (function (domGlobals) {
48814881
}
48824882
icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
48834883
ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
4884-
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '</div>';
4884+
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1"' + ariaPressed + '>' + '<button id="' + id + '-button" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + '</button>' + '</div>';
48854885
},
48864886
bindStates: function () {
48874887
var self = this, $ = self.$, textCls = self.classPrefix + 'txt';
@@ -5541,7 +5541,7 @@ var modern = (function (domGlobals) {
55415541
self.classes.add('btn-has-text');
55425542
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
55435543
}
5544-
return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
5544+
return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
55455545
},
55465546
postRender: function () {
55475547
var self = this, onClickHandler = self.settings.onclick;
@@ -8411,7 +8411,7 @@ var modern = (function (domGlobals) {
84118411
}
84128412
icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
84138413
self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button');
8414-
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
8414+
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1" aria-labelledby="' + id + '">' + '<button id="' + id + '-open" role="presentation" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
84158415
},
84168416
postRender: function () {
84178417
var self = this;
@@ -8885,7 +8885,7 @@ var modern = (function (domGlobals) {
88858885
shortcut = convertShortcut(shortcut);
88868886
}
88878887
icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
8888-
iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + '></i>\xA0' : '';
8888+
iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>\xA0' : '';
88898889
text = boldMatches(self.encode(markMatches(text)));
88908890
url = boldMatches(self.encode(markMatches(url)));
88918891
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' + iconHtml + (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') + (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') + (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') + (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') + '</div>';
@@ -9253,7 +9253,7 @@ var modern = (function (domGlobals) {
92539253
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
92549254
}
92559255
ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
9256-
return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
9256+
return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + ' aria-hidden="true"></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
92579257
},
92589258
postRender: function () {
92599259
var self = this, onClickHandler = self.settings.onclick;

src/js/_enqueues/wp/editor/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ window.wp = window.wp || {};
12731273

12741274
var $addMediaButton = $( '<button type="button" class="button insert-media add_media">' );
12751275

1276-
$addMediaButton.append( '<span class="wp-media-buttons-icon"></span>' );
1276+
$addMediaButton.append( '<span class="wp-media-buttons-icon" aria-hidden="true"></span>' );
12771277
$addMediaButton.append( document.createTextNode( ' ' + buttonText ) );
12781278
$addMediaButton.data( 'editor', id );
12791279

src/js/_enqueues/wp/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ themes.view.Themes = wp.Backbone.View.extend({
12211221

12221222
// 'Add new theme' element shown at the end of the grid.
12231223
if ( ! themes.isInstall && themes.data.settings.canInstall ) {
1224-
this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + l10n.addNew + '</h2></a></div>' );
1224+
this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span aria-hidden="true"></span></div><h2 class="theme-name">' + l10n.addNew + '</h2></a></div>' );
12251225
}
12261226

12271227
this.parent.page++;

src/wp-admin/css/customize-controls.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ body.trashing #publish-settings {
233233
display: inline-block;
234234
}
235235
#customize-control-trash_changeset .button-link:before {
236-
content: "\f182";
236+
content: "\f182" / '';
237237
font: normal 22px dashicons;
238238
text-decoration: none;
239239
position: absolute;
@@ -594,7 +594,7 @@ body.trashing #publish-settings {
594594

595595
#customize-theme-controls .accordion-section-title:after,
596596
#customize-outer-theme-controls .accordion-section-title:after {
597-
content: "\f345";
597+
content: "\f345" / '';
598598
color: #a7aaad;
599599
pointer-events: none;
600600
}
@@ -931,7 +931,7 @@ h3.customize-section-title {
931931

932932
.customize-controls-close:before {
933933
font: normal 22px/45px dashicons;
934-
content: "\f335";
934+
content: "\f335" / '';
935935
position: relative;
936936
top: -3px;
937937
left: 13px;
@@ -940,7 +940,7 @@ h3.customize-section-title {
940940
.customize-panel-back:before,
941941
.customize-section-back:before {
942942
font: normal 20px/72px dashicons;
943-
content: "\f341";
943+
content: "\f341" / '';
944944
position: relative;
945945
left: 9px;
946946
}
@@ -1026,7 +1026,7 @@ p.customize-section-description {
10261026

10271027
.customize-section-description a.external-link:after {
10281028
font: 16px/11px dashicons;
1029-
content: "\f504";
1029+
content: "\f504" / '';
10301030
top: 3px;
10311031
position: relative;
10321032
padding-left: 3px;
@@ -1357,7 +1357,7 @@ p.customize-section-description {
13571357
}
13581358

13591359
.customize-control .dropdown-arrow:after {
1360-
content: "\f140";
1360+
content: "\f140" / '';
13611361
font: normal 20px/1 dashicons;
13621362
speak: never;
13631363
display: block;
@@ -1882,7 +1882,7 @@ p.customize-section-description {
18821882
}
18831883

18841884
.themes-filter-bar .feature-filter-toggle:before {
1885-
content: "\f111";
1885+
content: "\f111" / '';
18861886
margin: 0 5px 0 0;
18871887
font: normal 16px/1 dashicons;
18881888
vertical-align: text-bottom;
@@ -2020,7 +2020,7 @@ p.customize-section-description {
20202020
}
20212021

20222022
.control-panel-themes .theme-section .customize-themes-section-title.selected:after {
2023-
content: "\f147";
2023+
content: "\f147" / '';
20242024
font: 16px/1 dashicons;
20252025
box-sizing: border-box;
20262026
width: 20px;
@@ -2523,7 +2523,7 @@ body.cheatin p {
25232523
.add-new-widget:before,
25242524
.add-new-menu-item:before,
25252525
#available-menu-items .new-content-item .add-content:before {
2526-
content: "\f132";
2526+
content: "\f132" / '';
25272527
display: inline-block;
25282528
position: relative;
25292529
left: -2px;
@@ -2602,12 +2602,12 @@ body.cheatin p {
26022602

26032603
.move-widget-down:before,
26042604
.menus-move-down:before {
2605-
content: "\f347";
2605+
content: "\f347" / '';
26062606
}
26072607

26082608
.move-widget-up:before,
26092609
.menus-move-up:before {
2610-
content: "\f343";
2610+
content: "\f343" / '';
26112611
}
26122612

26132613
#customize-theme-controls .first-widget .move-widget-up,
@@ -2767,7 +2767,7 @@ body.adding-widget .add-new-widget:before,
27672767

27682768
#available-widgets-filter .clear-results:before,
27692769
#available-menu-items-search .clear-results:before {
2770-
content: "\f335";
2770+
content: "\f335" / '';
27712771
font: normal 20px/1 dashicons;
27722772
vertical-align: middle;
27732773
-webkit-font-smoothing: antialiased;
@@ -2978,14 +2978,14 @@ body.adding-widget .add-new-widget:before,
29782978
.customize-controls-preview-toggle .preview:before,
29792979
.customize-controls-preview-toggle .controls:before {
29802980
font: normal 20px/1 dashicons;
2981-
content: "\f177";
2981+
content: "\f177" / '';
29822982
position: relative;
29832983
top: 4px;
29842984
margin-right: 6px;
29852985
}
29862986

29872987
.customize-controls-preview-toggle .controls:before {
2988-
content: "\f540";
2988+
content: "\f540" / '';
29892989
}
29902990

29912991
.preview-only #customize-controls {

src/wp-admin/css/customize-nav-menus.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@
141141
}
142142

143143
.menus-move-left:before {
144-
content: "\f341";
144+
content: "\f341" / '';
145145
}
146146

147147
.menus-move-right:before {
148-
content: "\f345";
148+
content: "\f345" / '';
149149
}
150150

151151
.reordering .menu-item .item-controls,
@@ -177,7 +177,7 @@
177177
}
178178

179179
.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:before {
180-
content: "\f142";
180+
content: "\f142" / '';
181181
}
182182

183183
.wp-customizer .menu-item-settings p.description {
@@ -277,7 +277,7 @@
277277
.customize-screen-options-toggle:before {
278278
-moz-osx-font-smoothing: grayscale;
279279
border: none;
280-
content: "\f111";
280+
content: "\f111" / '';
281281
display: block;
282282
font: 18px/1 dashicons;
283283
padding: 5px;
@@ -467,7 +467,7 @@
467467
}
468468

469469
.menu-item-bar .item-delete:before {
470-
content: "\f335";
470+
content: "\f335" / '';
471471
position: absolute;
472472
top: 9px;
473473
left: 5px;
@@ -652,7 +652,7 @@
652652
}
653653

654654
#available-menu-items .item-add:before {
655-
content: "\f543";
655+
content: "\f543" / '';
656656
position: relative;
657657
left: 2px;
658658
top: 3px;
@@ -670,7 +670,7 @@
670670
}
671671

672672
#available-menu-items .menu-item-handle.item-added .item-add:before {
673-
content: "\f147";
673+
content: "\f147" / '';
674674
}
675675

676676
#available-menu-items .accordion-section-title.loading .spinner,

0 commit comments

Comments
 (0)