Skip to content

Commit 765a1b5

Browse files
committed
Merge remote-tracking branch 'upstream/trunk' into fix-62287
2 parents 15f956a + 38a932a commit 765a1b5

45 files changed

Lines changed: 2243 additions & 270 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://develop.svn.wordpress.org/trunk"
88
},
99
"gutenberg": {
10-
"ref": "23b566c72e9c4a36219ef5d6e62890f05551f6cb"
10+
"ref": "022d8dd3d461f91b15c1f0410649d3ebb027207f"
1111
},
1212
"engines": {
1313
"node": ">=20.10.0",

src/js/media/views/attachments/browser.js

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -193,37 +193,49 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
193193
priority: -100,
194194
text: l10n.filterAttachments,
195195
level: 'h2',
196-
className: 'media-attachments-filter-heading'
196+
className: 'media-attachments-filter-heading screen-reader-text'
197197
}).render() );
198198
}
199199

200200
if ( showFilterByType ) {
201201
// "Filters" is a <select>, a visually hidden label element needs to be rendered before.
202-
this.toolbar.set( 'filtersLabel', new wp.media.view.Label({
202+
var filtersLabel = new wp.media.view.Label({
203203
value: l10n.filterByType,
204204
attributes: {
205205
'for': 'media-attachment-filters'
206206
},
207207
priority: -80
208-
}).render() );
208+
});
209209

210210
if ( 'uploaded' === this.options.filters ) {
211-
this.toolbar.set( 'filters', new wp.media.view.AttachmentFilters.Uploaded({
211+
Filters = new wp.media.view.AttachmentFilters.Uploaded({
212212
controller: this.controller,
213213
model: this.collection.props,
214-
priority: -80
215-
}).render() );
214+
});
216215
} else {
217216
Filters = new wp.media.view.AttachmentFilters.All({
218217
controller: this.controller,
219218
model: this.collection.props,
220-
priority: -80
221219
});
222-
223-
this.toolbar.set( 'filters', Filters.render() );
224220
}
225-
}
226221

222+
var filterContainer = wp.media.View.extend({
223+
tagname: 'div',
224+
className: 'media-filter-container type-filter',
225+
226+
initialize: function() {
227+
this.views.add( [ filtersLabel, Filters ] );
228+
}
229+
});
230+
231+
this.toolbar.set( 'filters', new filterContainer({
232+
controller: this.controller,
233+
model: this.controller.props,
234+
priority: -80
235+
}).render() );
236+
}
237+
238+
var dateFilter, dateFilterLabel, dateFilterContainer;
227239
/*
228240
* Feels odd to bring the global media library switcher into the Attachment browser view.
229241
* Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar );
@@ -241,17 +253,30 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
241253
}).render() );
242254

243255
// DateFilter is a <select>, a visually hidden label element needs to be rendered before.
244-
this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
256+
dateFilterLabel = new wp.media.view.Label({
245257
value: l10n.filterByDate,
246258
attributes: {
247259
'for': 'media-attachment-date-filters'
248260
},
249-
priority: -75
250-
}).render() );
251-
this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({
261+
});
262+
dateFilter = new wp.media.view.DateFilter({
263+
controller: this.controller,
264+
model: this.collection.props,
265+
});
266+
267+
dateFilterContainer = wp.media.View.extend({
268+
tagname: 'div',
269+
className: 'media-filter-container date-filter',
270+
271+
initialize: function() {
272+
this.views.add( [ dateFilterLabel, dateFilter ] );
273+
}
274+
});
275+
276+
this.toolbar.set( 'dateFilters', new dateFilterContainer({
252277
controller: this.controller,
253278
model: this.collection.props,
254-
priority: -75
279+
priority: -75
255280
}).render() );
256281

257282
// BulkSelection is a <div> with subviews, including screen reader text.
@@ -363,17 +388,30 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
363388

364389
} else if ( this.options.date ) {
365390
// DateFilter is a <select>, a visually hidden label element needs to be rendered before.
366-
this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
391+
dateFilterLabel = new wp.media.view.Label({
367392
value: l10n.filterByDate,
368393
attributes: {
369394
'for': 'media-attachment-date-filters'
370395
},
371-
priority: -75
372-
}).render() );
373-
this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({
396+
});
397+
dateFilter = new wp.media.view.DateFilter({
398+
controller: this.controller,
399+
model: this.collection.props,
400+
});
401+
402+
dateFilterContainer = wp.media.View.extend({
403+
tagname: 'div',
404+
className: 'media-filter-container date-filter',
405+
406+
initialize: function() {
407+
this.views.add( [ dateFilterLabel, dateFilter ] );
408+
}
409+
});
410+
411+
this.toolbar.set( 'dateFilters', new dateFilterContainer({
374412
controller: this.controller,
375413
model: this.collection.props,
376-
priority: -75
414+
priority: -75
377415
}).render() );
378416
}
379417

src/js/media/views/label.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111
var Label = wp.media.View.extend(/** @lends wp.media.view.Label.prototype */{
1212
tagName: 'label',
13-
className: 'screen-reader-text',
1413

1514
initialize: function() {
1615
this.value = this.options.value;

src/js/media/views/uploader/inline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype *
115115

116116
$browser.detach().text( $placeholder.text() );
117117
$browser[0].className = $placeholder[0].className;
118-
$browser[0].setAttribute( 'aria-labelledby', $browser[0].id + ' ' + $placeholder[0].getAttribute('aria-labelledby') );
118+
$browser[0].setAttribute( 'aria-describedby', $placeholder[0].getAttribute('aria-describedby') );
119119
$placeholder.replaceWith( $browser.show() );
120120
}
121121

src/wp-admin/css/common.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,11 +1575,11 @@ div.error.notice-alt {
15751575

15761576
.notice-info {
15771577
border-left-color: #3858e9;
1578-
background-color: transparent;
1578+
background-color: #fff;
15791579
}
15801580

15811581
.notice-info.notice-alt {
1582-
background-color: transparent;
1582+
background-color: #fff;
15831583
}
15841584

15851585
#plugin-information-footer .update-now:not(.button-disabled):before {

src/wp-admin/css/dashboard.css

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#dashboard-widgets-wrap {
4242
overflow: hidden;
43-
margin: 0 -4px;
43+
margin: 0 -8px;
4444
}
4545

4646
#dashboard-widgets .postbox {
@@ -59,8 +59,8 @@
5959
display: flow-root; /* avoid margin collapsing between parent and first/last child elements */
6060
/* Required min-height to make the jQuery UI Sortable drop zone work. */
6161
min-height: 0;
62-
margin-right: 8px;
63-
padding: 4px;
62+
margin: 0 8px 20px;
63+
padding: 0;
6464
}
6565

6666
#dashboard-widgets .meta-box-sortables:not(:empty) {
@@ -140,7 +140,7 @@
140140
position: relative;
141141
overflow: auto;
142142
margin: 16px 0;
143-
background-color: #151515;
143+
background-color: #c3c4c7;
144144
border: 1px solid rgb(0, 0, 0, 0.1);
145145
border-radius: 8px;
146146
font-size: 14px;
@@ -499,9 +499,7 @@
499499
}
500500

501501
.community-events .spinner {
502-
float: none;
503-
margin: 5px 2px 0;
504-
vertical-align: top;
502+
margin: 0 2px 0;
505503
}
506504

507505
.community-events-errors[aria-hidden="true"],
@@ -520,13 +518,15 @@
520518

521519
.community-events-form {
522520
margin: 15px 0 5px;
521+
display: flex;
522+
gap: 5px;
523+
align-items: center;
524+
flex-wrap: wrap;
523525
}
524526

525527
.community-events-form .regular-text {
526528
width: 40%;
527-
height: 29px;
528529
margin: 0;
529-
vertical-align: top;
530530
}
531531

532532
.community-events li.event-none {
@@ -538,10 +538,7 @@
538538
}
539539

540540
.community-events-form label {
541-
display: inline-block;
542-
vertical-align: top;
543541
line-height: 2.15384615;
544-
height: 28px;
545542
}
546543

547544
.community-events .activity-block > p {
@@ -553,17 +550,8 @@
553550
vertical-align: middle;
554551
}
555552

556-
#community-events-submit {
557-
margin-left: 3px;
558-
margin-right: 3px;
559-
}
560-
561553
/* Needs higher specificity than #dashboard-widgets .button-link */
562554
#dashboard-widgets .community-events-cancel.button-link {
563-
vertical-align: top;
564-
/* Same properties as the submit button for cross-browsers alignment. */
565-
line-height: 2;
566-
height: 28px;
567555
text-decoration: underline;
568556
}
569557

@@ -1454,29 +1442,18 @@ a.rsswidget {
14541442
vertical-align: baseline;
14551443
}
14561444

1457-
.community-events-form .regular-text {
1458-
height: 32px;
1459-
}
1460-
14611445
#community-events-submit {
14621446
margin-bottom: 0;
1463-
/* Override .wp-core-ui .button */
1464-
vertical-align: top;
14651447
}
14661448

14671449
.community-events-form label,
14681450
#dashboard-widgets .community-events-cancel.button-link {
14691451
/* Same properties as the submit button for cross-browsers alignment. */
14701452
font-size: 14px;
14711453
line-height: normal;
1472-
height: auto;
14731454
padding: 6px 0;
14741455
border: 1px solid transparent;
14751456
}
1476-
1477-
.community-events .spinner {
1478-
margin-top: 7px;
1479-
}
14801457
}
14811458

14821459
/* Smartphone */

src/wp-admin/css/edit.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,16 @@
7676
pointer-events: none;
7777
}
7878

79+
#titlewrap .skiplink {
80+
background: #fff;
81+
line-height: 2.30769231; /* 30px for 32px min-height */
82+
min-height: 32px;
83+
right: 4px;
84+
}
85+
7986
#titlewrap .skiplink:focus {
8087
clip: inherit;
8188
clip-path: inherit;
82-
right: 4px;
8389
top: 4px;
8490
width: auto;
8591
}
@@ -822,7 +828,7 @@ form#tags-filter {
822828

823829
.privacy-settings-tab.active,
824830
.health-check-tab.active {
825-
box-shadow: inset 0 -3px #3582c4;
831+
box-shadow: inset 0 -3px var(--wp-admin-theme-color);
826832
font-weight: 600;
827833
}
828834

@@ -896,7 +902,7 @@ form#tags-filter {
896902
border: none;
897903
box-shadow: none;
898904
outline-offset: -1px;
899-
outline: 2px solid #2271b1;
905+
outline: 2px solid var(--wp-admin-theme-color);
900906
background-color: #f6f7f7;
901907
}
902908

@@ -1061,10 +1067,6 @@ form#tags-filter {
10611067
#edit-slug-box {
10621068
padding: 0;
10631069
}
1064-
1065-
#titlewrap .skiplink:focus {
1066-
top: 5px;
1067-
}
10681070
}
10691071

10701072
@media only screen and (max-width: 1004px) {

src/wp-admin/css/list-tables.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,14 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
14521452
content: "\f147" / '';
14531453
}
14541454

1455+
.plugin-card .updated-message:before,
1456+
.plugin-card .updating-message:before {
1457+
line-height: 1;
1458+
position: relative;
1459+
top: -2px;
1460+
vertical-align: middle;
1461+
}
1462+
14551463
.plugin-install-php #the-list {
14561464
display: flex;
14571465
flex-wrap: wrap;

src/wp-admin/css/login.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ p {
4949
margin-top: 0;
5050
margin-left: 0;
5151
margin-bottom: 20px;
52-
background-color: transparent;
52+
background-color: #fff;
5353
word-wrap: break-word;
5454
}
5555

@@ -66,10 +66,6 @@ p {
6666
background-color: #eff9f1;
6767
}
6868

69-
.login .notice {
70-
background-color: #fff;
71-
}
72-
7369
/* Match border color from common.css */
7470
.login .notice-error {
7571
border-left-color: #cc1818;

src/wp-admin/css/media.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,10 @@ border color while dragging a file over the uploader drop area */
555555
height: auto;
556556
}
557557

558+
.media-frame.mode-grid .media-toolbar label {
559+
display: block;
560+
}
561+
558562
.media-frame.mode-grid .media-toolbar select {
559563
margin: 0 10px 0 0;
560564
min-height: 32px;
@@ -572,11 +576,12 @@ border color while dragging a file over the uploader drop area */
572576
min-height: 32px;
573577
line-height: 2.30769231; /* 30px for 32px height with 13px font */
574578
padding: 0 12px;
579+
align-self: end;
575580
}
576581

577582
.media-frame.mode-grid.mode-edit .media-toolbar-secondary > .select-mode-toggle-button {
578583
margin: 0 8px 0 0;
579-
vertical-align: middle;
584+
height: 100%;
580585
}
581586

582587
.media-frame.mode-grid .attachments-browser .bulk-select {

0 commit comments

Comments
 (0)