Plugin details: Accessibility improvements

* Focus the close link to transfer focus into the plugin modal.
* Set title attribute on iframe for screereaders.

props jwenerd for initial patch and a11y team for testing.
fixes #28823.

git-svn-id: https://develop.svn.wordpress.org/trunk@29534 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-08-18 20:01:47 +00:00
parent 1e61bbb8f1
commit c6e4597bbf
2 changed files with 9 additions and 1 deletions

View File

@ -2533,6 +2533,11 @@ body.index-php .tb-close-icon {
transition: color .1s ease-in-out, background .1s ease-in-out;
}
body.plugin-install-php #TB_closeWindowButton:focus .tb-close-icon,
body.import-php #TB_closeWindowButton:focus .tb-close-icon,
body.plugins-php #TB_closeWindowButton:focus .tb-close-icon,
body.update-core-php #TB_closeWindowButton:focus .tb-close-icon,
body.index-php #TB_closeWindowButton:focus .tb-close-icon,
body.plugin-install-php .tb-close-icon:focus,
body.plugin-install-php .tb-close-icon:hover,
body.import-php .tb-close-icon:focus,

View File

@ -42,7 +42,10 @@ jQuery( document ).ready( function( $ ) {
tb_click.call(this);
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
$('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).data( 'title' ) );
$('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).data( 'title' ) );
$('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) );
$('#TB_closeWindowButton').focus();
return false;
});