From 4b51c9f5d50edbfa08ea81a1ec9f39f3c369f015 Mon Sep 17 00:00:00 2001 From: joedolson Date: Fri, 17 May 2024 20:30:15 +0000 Subject: [PATCH] Administration: A11y: Hide thickbox close icon from screen readers. Add `aria-hidden="true"` to the dashicon symbol used as the `close` icon in Thickbox modals. Prevent the icon from being read as a replacement character by screen readers. Props stevejonesdev, sabernhardt, joedolson. See #61028. Built from https://develop.svn.wordpress.org/trunk@58167 git-svn-id: http://core.svn.wordpress.org/trunk@57630 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/thickbox/thickbox.js | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js index e8b95677c1..2c7b7f9526 100644 --- a/wp-includes/js/thickbox/thickbox.js +++ b/wp-includes/js/thickbox/thickbox.js @@ -146,7 +146,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; - jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); + jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); @@ -211,7 +211,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic urlNoQuery = url.split('TB_'); jQuery("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal - jQuery("#TB_window").append("
"+caption+"
"); + jQuery("#TB_window").append("
"+caption+"
"); }else{//iframe modal jQuery("#TB_overlay").off(); jQuery("#TB_window").append(""); @@ -219,7 +219,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic }else{// not an iframe, ajax if(jQuery("#TB_window").css("visibility") != "visible"){ if(params['modal'] != "true"){//ajax no modal - jQuery("#TB_window").append("
"+caption+"
"); + jQuery("#TB_window").append("
"+caption+"
"); }else{//ajax modal jQuery("#TB_overlay").off(); jQuery("#TB_window").append("
"); diff --git a/wp-includes/version.php b/wp-includes/version.php index 468a94688a..db9d046de4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58165'; +$wp_version = '6.6-alpha-58167'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.