Skip to content

Commit ab96de1

Browse files
committed
Merge remote-tracking branch 'upstream/trunk' into try/remove-gutenberg-git-checkout-and-build
2 parents 0702c40 + 105c7aa commit ab96de1

32 files changed

Lines changed: 395 additions & 204 deletions

src/js/_enqueues/admin/common.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,9 +1350,11 @@ $( function() {
13501350
event.stopPropagation();
13511351
$( 'html, body' ).animate( { scrollTop: 0 } );
13521352

1353-
var errorMessage = __( 'Please select at least one item to perform this action on.' );
1353+
var errorMessage = value !== '-1' ?
1354+
__( 'Please select at least one item to perform this action on.' ) :
1355+
__( 'Please select a bulk action to perform.' );
13541356
addAdminNotice( {
1355-
id: 'no-items-selected',
1357+
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
13561358
type: 'error',
13571359
message: errorMessage,
13581360
dismissible: true,

src/js/_enqueues/admin/link.js

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,37 @@ jQuery( function($) {
1919
*
2020
* @return {boolean} Always returns false to prevent the default behavior.
2121
*/
22-
$('#category-tabs a').on( 'click', function(){
22+
$('#category-tabs a').on( 'click keyup keydown', function( event ){
2323
var t = $(this).attr('href');
24-
$(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
25-
$('.tabs-panel').hide();
26-
$(t).show();
27-
if ( '#categories-all' == t )
28-
deleteUserSetting('cats');
29-
else
30-
setUserSetting('cats','pop');
31-
return false;
24+
if ( event.type === 'keydown' && event.key === ' ' ) {
25+
event.preventDefault();
26+
}
27+
if ( ( event.type === 'keyup' && event.key === ' ' ) || ( event.type === 'keydown' && event.key === 'Enter' ) || event.type === 'click' ) {
28+
event.preventDefault();
29+
$('#category-tabs a').removeAttr( 'aria-selected' ).attr( 'tabindex', '-1' );
30+
$(this).attr( 'aria-selected', 'true' ).removeAttr( 'tabindex' );
31+
$(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
32+
$('.tabs-panel').hide();
33+
$(t).show();
34+
if ( '#categories-all' == t ) {
35+
deleteUserSetting('cats');
36+
} else {
37+
setUserSetting('cats','pop');
38+
}
39+
return false;
40+
}
41+
if ( event.type === 'keyup' && ( event.key === 'ArrowRight' || event.key === 'ArrowLeft' ) ) {
42+
$(this).attr( 'tabindex', '-1' );
43+
let next = $(this).parent('li').next();
44+
let prev = $(this).parent('li').prev();
45+
if ( next.length > 0 ) {
46+
next.find('a').removeAttr( 'tabindex');
47+
next.find('a').trigger( 'focus' );
48+
} else {
49+
prev.find('a').removeAttr( 'tabindex');
50+
prev.find('a').trigger( 'focus' );
51+
}
52+
}
3253
});
3354
if ( getUserSetting('cats') )
3455
$('#category-tabs a[href="#categories-pop"]').trigger( 'click' );

src/js/_enqueues/admin/post.js

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -566,16 +566,35 @@ jQuery( function($) {
566566
}
567567

568568
// @todo Move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.js.
569-
$('a', '#' + taxonomy + '-tabs').on( 'click', function( e ) {
570-
e.preventDefault();
569+
$('a', '#' + taxonomy + '-tabs').on( 'click keyup keydown', function( event ) {
571570
var t = $(this).attr('href');
572-
$(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
573-
$('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide();
574-
$(t).show();
575-
if ( '#' + taxonomy + '-all' == t ) {
576-
deleteUserSetting( settingName );
577-
} else {
578-
setUserSetting( settingName, 'pop' );
571+
if ( event.type === 'keydown' && event.key === ' ' ) {
572+
event.preventDefault();
573+
}
574+
if ( ( event.type === 'keyup' && event.key === ' ' ) || ( event.type === 'keydown' && event.key === 'Enter' ) || event.type === 'click' ) {
575+
event.preventDefault();
576+
$('#' + taxonomy + '-tabs a').removeAttr( 'aria-selected' ).attr( 'tabindex', '-1' );
577+
$(this).attr( 'aria-selected', 'true' ).removeAttr( 'tabindex' );
578+
$(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
579+
$('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide();
580+
$(t).show();
581+
if ( '#' + taxonomy + '-all' == t ) {
582+
deleteUserSetting( settingName );
583+
} else {
584+
setUserSetting( settingName, 'pop' );
585+
}
586+
}
587+
if ( event.type === 'keyup' && ( event.key === 'ArrowRight' || event.key === 'ArrowLeft' ) ) {
588+
$(this).attr( 'tabindex', '-1' );
589+
let next = $(this).parent('li').next();
590+
let prev = $(this).parent('li').prev();
591+
if ( next.length > 0 ) {
592+
next.find('a').removeAttr( 'tabindex');
593+
next.find('a').trigger( 'focus' );
594+
} else {
595+
prev.find('a').removeAttr( 'tabindex');
596+
prev.find('a').trigger( 'focus' );
597+
}
579598
}
580599
});
581600

src/wp-admin/css/common.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ html.wp-toolbar {
22452245

22462246
.postbox .handle-order-higher,
22472247
.postbox .handle-order-lower {
2248-
color: #787c82;
2248+
color: #646970;
22492249
width: 1.62rem;
22502250
}
22512251

@@ -3659,7 +3659,7 @@ img {
36593659
.postbox .handlediv.button-link,
36603660
.item-edit,
36613661
.toggle-indicator {
3662-
color: #787c82;
3662+
color: #646970;
36633663
}
36643664

36653665
.widget-action {

src/wp-admin/css/dashboard.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
margin-bottom: 0;
626626
padding: 12px;
627627
border-top: 1px solid #f0f0f1;
628-
color: #dcdcde;
628+
color: #646970;
629629
}
630630

631631
/* Safari 10 + VoiceOver specific: without this, the hidden text gets read out before the link. */
@@ -950,7 +950,7 @@ body #dashboard-widgets .postbox form .submit {
950950
}
951951

952952
.activity-block .subsubsub li {
953-
color: #dcdcde;
953+
color: #646970;
954954
}
955955

956956
/* Dashboard activity widget - Comments */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ p.pagenav {
853853
}
854854

855855
.row-actions {
856-
color: #a7aaad;
856+
color: #646970;
857857
font-size: 13px;
858858
padding: 2px 0 0;
859859
position: relative;

src/wp-admin/css/site-icon.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
button.reset.remove-site-icon {
182182
color: var(--site-icon-removal);
183183
text-decoration: none;
184-
border-color: transparent;
184+
border-color: currentColor;
185185
box-shadow: none;
186186
background: transparent;
187187
}

src/wp-admin/includes/meta-boxes.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -644,18 +644,18 @@ function post_categories_meta_box( $post, $box ) {
644644
$taxonomy = get_taxonomy( $parsed_args['taxonomy'] );
645645
?>
646646
<div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
647-
<ul id="<?php echo $tax_name; ?>-tabs" class="category-tabs">
648-
<li class="tabs"><a href="#<?php echo $tax_name; ?>-all"><?php echo $taxonomy->labels->all_items; ?></a></li>
649-
<li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop"><?php echo esc_html( $taxonomy->labels->most_used ); ?></a></li>
647+
<ul id="<?php echo $tax_name; ?>-tabs" class="category-tabs" role="tablist">
648+
<li class="tabs"><a href="#<?php echo $tax_name; ?>-all" role="tab" aria-selected="true" aria-controls="<?php echo $tax_name; ?>-all"><?php echo $taxonomy->labels->all_items; ?></a></li>
649+
<li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop" role="tab" aria-controls="<?php echo $tax_name; ?>-pop"><?php echo esc_html( $taxonomy->labels->most_used ); ?></a></li>
650650
</ul>
651651

652-
<div id="<?php echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;">
652+
<div id="<?php echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;" role="tabpanel">
653653
<ul id="<?php echo $tax_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
654654
<?php $popular_ids = wp_popular_terms_checklist( $tax_name ); ?>
655655
</ul>
656656
</div>
657657

658-
<div id="<?php echo $tax_name; ?>-all" class="tabs-panel">
658+
<div id="<?php echo $tax_name; ?>-all" class="tabs-panel" role="tabpanel">
659659
<?php
660660
$name = ( 'category' === $tax_name ) ? 'post_category' : 'tax_input[' . $tax_name . ']';
661661
// Allows for an empty term set to be sent. 0 is an invalid term ID and will be ignored by empty() checks.
@@ -1176,12 +1176,12 @@ function link_submit_meta_box( $link ) {
11761176
function link_categories_meta_box( $link ) {
11771177
?>
11781178
<div id="taxonomy-linkcategory" class="categorydiv">
1179-
<ul id="category-tabs" class="category-tabs">
1180-
<li class="tabs"><a href="#categories-all"><?php _e( 'All categories' ); ?></a></li>
1181-
<li class="hide-if-no-js"><a href="#categories-pop"><?php _ex( 'Most Used', 'categories' ); ?></a></li>
1179+
<ul id="category-tabs" class="category-tabs" role="tablist">
1180+
<li class="tabs"><a href="#categories-all" role="tab" aria-controls="categories-all" aria-selected="true"><?php _e( 'All categories' ); ?></a></li>
1181+
<li class="hide-if-no-js"><a href="#categories-pop" role="tab" aria-controls="categories-pop"><?php _ex( 'Most Used', 'categories' ); ?></a></li>
11821182
</ul>
11831183

1184-
<div id="categories-all" class="tabs-panel">
1184+
<div id="categories-all" class="tabs-panel" role="tabpanel">
11851185
<ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear">
11861186
<?php
11871187
if ( isset( $link->link_id ) ) {
@@ -1193,7 +1193,7 @@ function link_categories_meta_box( $link ) {
11931193
</ul>
11941194
</div>
11951195

1196-
<div id="categories-pop" class="tabs-panel" style="display: none;">
1196+
<div id="categories-pop" class="tabs-panel" style="display: none;" role="tabpanel">
11971197
<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
11981198
<?php wp_popular_terms_checklist( 'link_category' ); ?>
11991199
</ul>

src/wp-admin/options-general.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
202202
<button
203203
id="js-remove-site-icon"
204204
type="button"
205-
<?php echo has_site_icon() ? 'class="button button-secondary reset remove-site-icon"' : 'class="button button-secondary reset hidden"'; ?>
205+
<?php echo has_site_icon() ? 'class="button button-secondary reset remove-site-icon"' : 'class="button button-secondary reset remove-site-icon hidden"'; ?>
206206
>
207207
<?php _e( 'Remove Site Icon' ); ?>
208208
</button>

src/wp-includes/Requests/src/IdnaEncoder.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,18 @@ protected static function utf8_to_codepoints($input) {
216216
}
217217

218218
if (// Non-shortest form sequences are invalid
219-
$length > 1 && $character <= 0x7F
220-
|| $length > 2 && $character <= 0x7FF
221-
|| $length > 3 && $character <= 0xFFFF
219+
($length > 1 && $character <= 0x7F)
220+
|| ($length > 2 && $character <= 0x7FF)
221+
|| ($length > 3 && $character <= 0xFFFF)
222222
// Outside of range of ucschar codepoints
223223
// Noncharacters
224224
|| ($character & 0xFFFE) === 0xFFFE
225-
|| $character >= 0xFDD0 && $character <= 0xFDEF
225+
|| ($character >= 0xFDD0 && $character <= 0xFDEF)
226226
|| (
227227
// Everything else not in ucschar
228-
$character > 0xD7FF && $character < 0xF900
228+
($character > 0xD7FF && $character < 0xF900)
229229
|| $character < 0x20
230-
|| $character > 0x7E && $character < 0xA0
230+
|| ($character > 0x7E && $character < 0xA0)
231231
|| $character > 0xEFFFD
232232
)
233233
) {

0 commit comments

Comments
 (0)