Accessibility: the Thickbox "Close" control should always be a button.

Fix the last case where the "Close" control was still a link. All the other ones
were already changed in buttons.

Fixes #36267.

git-svn-id: https://develop.svn.wordpress.org/trunk@37531 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2016-05-23 10:29:44 +00:00
parent bd1527d4ab
commit d5373c004c
2 changed files with 10 additions and 1 deletions

View File

@ -145,3 +145,12 @@
#TB_closeWindowButton:focus .tb-close-icon { #TB_closeWindowButton:focus .tb-close-icon {
color: #00a0d2; color: #00a0d2;
} }
#TB_closeWindowButton:focus .tb-close-icon {
-webkit-box-shadow:
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba(30, 140, 190, .8);
box-shadow:
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba(30, 140, 190, .8);
}

View File

@ -212,7 +212,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
}else{// not an iframe, ajax }else{// not an iframe, ajax
if(jQuery("#TB_window").css("visibility") != "visible"){ if(jQuery("#TB_window").css("visibility") != "visible"){
if(params['modal'] != "true"){//ajax no modal if(params['modal'] != "true"){//ajax no modal
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><div class='tb-close-icon'></div></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
}else{//ajax modal }else{//ajax modal
jQuery("#TB_overlay").unbind(); jQuery("#TB_overlay").unbind();
jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");