Accessibility: Remove arrows navigation from the Site Health accordions.
Arrows navigation on accordions is an optional keyboard interaction feature mentioned in the WAI-ARIA Authoring Practices. While it can add some value in some specific cases, it's not so discoverable and it's unlikely users, including assistive technologies users, would really "expect" this kind of interaction. See #46573. Fixes #46682. Built from https://develop.svn.wordpress.org/trunk@45069 git-svn-id: http://core.svn.wordpress.org/trunk@44878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
02983a458d
commit
9f09fcb1c2
|
@ -33,14 +33,6 @@ jQuery( document ).ready( function( $ ) {
|
|||
}
|
||||
} );
|
||||
|
||||
$( '.health-check-accordion' ).on( 'keyup', '.health-check-accordion-trigger', function( e ) {
|
||||
if ( '38' === e.keyCode.toString() ) {
|
||||
$( '.health-check-accordion-trigger', $( this ).closest( 'dt' ).prevAll( 'dt' ) ).focus();
|
||||
} else if ( '40' === e.keyCode.toString() ) {
|
||||
$( '.health-check-accordion-trigger', $( this ).closest( 'dt' ).nextAll( 'dt' ) ).focus();
|
||||
}
|
||||
} );
|
||||
|
||||
// Site Health test handling.
|
||||
|
||||
$( '.site-health-view-passed' ).on( 'click', function() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(a){function b(b){var c=wp.template("health-check-issue"),d=a("#health-check-issues-"+b.status),e=a(".issue-count",d);SiteHealth.site_status.issues[b.status]++,e.text(SiteHealth.site_status.issues[b.status]),a(".issues","#health-check-issues-"+b.status).append(c(b))}function c(){var b,c,d,e=a(".site-health-progress"),f=e.find(".progress-count"),g=a(".site-health-progress svg #bar"),h=parseInt(SiteHealth.site_status.issues.good,0)+parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),i=parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),j=100-Math.ceil(i/h*100);return 0===h?void e.addClass("hidden"):(e.removeClass("loading"),b=g.attr("r"),c=Math.PI*(2*b),0>j&&(j=0),100<j&&(j=100),d=(100-j)/100*c,g.css({strokeDashoffset:d}),1>parseInt(SiteHealth.site_status.issues.critical,0)&&a("#health-check-issues-critical").addClass("hidden"),1>parseInt(SiteHealth.site_status.issues.recommended,0)&&a("#health-check-issues-recommended").addClass("hidden"),50<=j&&g.addClass("orange").removeClass("red"),90<=j&&g.addClass("green").removeClass("orange"),100===j&&(a(".site-status-all-clear").removeClass("hide"),a(".site-status-has-issues").addClass("hide")),f.text(j+"%"),a.post(ajaxurl,{action:"health-check-site-status-result",_wpnonce:SiteHealth.nonce.site_status_result,counts:SiteHealth.site_status.issues}),void wp.a11y.speak(SiteHealth.string.site_health_complete_screen_reader.replace("%s",j+"%")))}function d(){var e=!0;1<=SiteHealth.site_status.async.length&&a.each(SiteHealth.site_status.async,function(){var c={action:"health-check-"+this.test.replace("_","-"),_wpnonce:SiteHealth.nonce.site_status};return!!this.completed||(e=!1,this.completed=!0,a.post(ajaxurl,c,function(a){b(a.data),d()}),!1)}),e&&c()}var e,f=new ClipboardJS(".site-health-copy-buttons .copy-button");f.on("success",function(b){var c=a(b.trigger).closest("div");a(".success",c).addClass("visible"),wp.a11y.speak(SiteHealth.string.site_info_copied)}),a(".health-check-accordion").on("click",".health-check-accordion-trigger",function(){var b="true"===a(this).attr("aria-expanded");b?(a(this).attr("aria-expanded","false"),a("#"+a(this).attr("aria-controls")).attr("hidden",!0)):(a(this).attr("aria-expanded","true"),a("#"+a(this).attr("aria-controls")).attr("hidden",!1))}),a(".health-check-accordion").on("keyup",".health-check-accordion-trigger",function(b){"38"===b.keyCode.toString()?a(".health-check-accordion-trigger",a(this).closest("dt").prevAll("dt")).focus():"40"===b.keyCode.toString()&&a(".health-check-accordion-trigger",a(this).closest("dt").nextAll("dt")).focus()}),a(".site-health-view-passed").on("click",function(){var b=a("#health-check-issues-good");b.toggleClass("hidden"),a(this).attr("aria-expanded",!b.hasClass("hidden"))}),"undefined"!=typeof SiteHealth&&(0===SiteHealth.site_status.direct.length&&0===SiteHealth.site_status.async.length?c():SiteHealth.site_status.issues={good:0,recommended:0,critical:0},0<SiteHealth.site_status.direct.length&&a.each(SiteHealth.site_status.direct,function(){b(this)}),0<SiteHealth.site_status.async.length?(e={action:"health-check-"+SiteHealth.site_status.async[0].test.replace("_","-"),_wpnonce:SiteHealth.nonce.site_status},SiteHealth.site_status.async[0].completed=!0,a.post(ajaxurl,e,function(a){b(a.data),d()})):c())});
|
||||
jQuery(document).ready(function(a){function b(b){var c=wp.template("health-check-issue"),d=a("#health-check-issues-"+b.status),e=a(".issue-count",d);SiteHealth.site_status.issues[b.status]++,e.text(SiteHealth.site_status.issues[b.status]),a(".issues","#health-check-issues-"+b.status).append(c(b))}function c(){var b,c,d,e=a(".site-health-progress"),f=e.find(".progress-count"),g=a(".site-health-progress svg #bar"),h=parseInt(SiteHealth.site_status.issues.good,0)+parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),i=parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),j=100-Math.ceil(i/h*100);return 0===h?void e.addClass("hidden"):(e.removeClass("loading"),b=g.attr("r"),c=Math.PI*(2*b),0>j&&(j=0),100<j&&(j=100),d=(100-j)/100*c,g.css({strokeDashoffset:d}),1>parseInt(SiteHealth.site_status.issues.critical,0)&&a("#health-check-issues-critical").addClass("hidden"),1>parseInt(SiteHealth.site_status.issues.recommended,0)&&a("#health-check-issues-recommended").addClass("hidden"),50<=j&&g.addClass("orange").removeClass("red"),90<=j&&g.addClass("green").removeClass("orange"),100===j&&(a(".site-status-all-clear").removeClass("hide"),a(".site-status-has-issues").addClass("hide")),f.text(j+"%"),a.post(ajaxurl,{action:"health-check-site-status-result",_wpnonce:SiteHealth.nonce.site_status_result,counts:SiteHealth.site_status.issues}),void wp.a11y.speak(SiteHealth.string.site_health_complete_screen_reader.replace("%s",j+"%")))}function d(){var e=!0;1<=SiteHealth.site_status.async.length&&a.each(SiteHealth.site_status.async,function(){var c={action:"health-check-"+this.test.replace("_","-"),_wpnonce:SiteHealth.nonce.site_status};return!!this.completed||(e=!1,this.completed=!0,a.post(ajaxurl,c,function(a){b(a.data),d()}),!1)}),e&&c()}var e,f=new ClipboardJS(".site-health-copy-buttons .copy-button");f.on("success",function(b){var c=a(b.trigger).closest("div");a(".success",c).addClass("visible"),wp.a11y.speak(SiteHealth.string.site_info_copied)}),a(".health-check-accordion").on("click",".health-check-accordion-trigger",function(){var b="true"===a(this).attr("aria-expanded");b?(a(this).attr("aria-expanded","false"),a("#"+a(this).attr("aria-controls")).attr("hidden",!0)):(a(this).attr("aria-expanded","true"),a("#"+a(this).attr("aria-controls")).attr("hidden",!1))}),a(".site-health-view-passed").on("click",function(){var b=a("#health-check-issues-good");b.toggleClass("hidden"),a(this).attr("aria-expanded",!b.hasClass("hidden"))}),"undefined"!=typeof SiteHealth&&(0===SiteHealth.site_status.direct.length&&0===SiteHealth.site_status.async.length?c():SiteHealth.site_status.issues={good:0,recommended:0,critical:0},0<SiteHealth.site_status.direct.length&&a.each(SiteHealth.site_status.direct,function(){b(this)}),0<SiteHealth.site_status.async.length?(e={action:"health-check-"+SiteHealth.site_status.async[0].test.replace("_","-"),_wpnonce:SiteHealth.nonce.site_status},SiteHealth.site_status.async[0].completed=!0,a.post(ajaxurl,e,function(a){b(a.data),d()})):c())});
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta1-45068';
|
||||
$wp_version = '5.2-beta1-45069';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue