Make post meta box toggles accessible.

props joedolson.
fixes #33544.
Built from https://develop.svn.wordpress.org/trunk@33762


git-svn-id: http://core.svn.wordpress.org/trunk@33730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2015-08-26 15:23:24 +00:00
parent b6c01b80fa
commit fc9961ca22
8 changed files with 18 additions and 12 deletions

View File

@@ -11,13 +11,16 @@ var postboxes;
self.init(page, args);
$('.postbox .hndle, .postbox .handlediv').bind('click.postboxes', function() {
$('.postbox .hndle, .postbox .handlediv').bind('click.postboxes', function( e ) {
var p = $(this).parent('.postbox'), id = p.attr('id');
if ( 'dashboard_browser_nag' == id )
return;
p.toggleClass('closed');
e.preventDefault();
p.toggleClass( 'closed' );
$(this).attr( 'aria-expanded', ! p.hasClass( 'closed' ) );
if ( page != 'press-this' )
self.save_state(page);