Ticket #38677: 38677.diff
File 38677.diff, 2.4 KB (added by , 6 years ago) |
---|
-
src/wp-admin/includes/class-wp-posts-list-table.php
1267 1267 __( 'Edit' ) 1268 1268 ); 1269 1269 $actions['inline hide-if-no-js'] = sprintf( 1270 '< a href="#" class="editinline" aria-label="%s">%s</a>',1270 '<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>', 1271 1271 /* translators: %s: post title */ 1272 1272 esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $title ) ), 1273 1273 __( 'Quick Edit' ) -
src/wp-admin/js/inline-edit-post.js
119 119 }); 120 120 121 121 /** 122 * Binds click event to the .editinline linkwhich opens the quick editor.122 * Binds click event to the .editinline button which opens the quick editor. 123 123 */ 124 $( '#the-list').on( 'click', 'a.editinline', function( e) {125 e.preventDefault();126 inlineEditPost.edit( this);124 $( '#the-list' ).on( 'click', '.editinline', function() { 125 $( this ).attr( 'aria-expanded', 'true' ); 126 inlineEditPost.edit( this ); 127 127 }); 128 128 129 129 $('#bulk-edit').find('fieldset:first').after( … … 422 422 $(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove(); 423 423 $('#edit-'+id).before(r).remove(); 424 424 $( inlineEditPost.what + id ).hide().fadeIn( 400, function() { 425 // Move focus back to the Quick Edit link. $( this ) is the row being animated. 426 $( this ).find( '.editinline' ).focus(); 425 // Move focus back to the Quick Edit button. $( this ) is the row being animated. 426 $( this ).find( '.editinline' ) 427 .attr( 'aria-expanded', 'false' ) 428 .focus(); 427 429 wp.a11y.speak( inlineEditL10n.saved ); 428 430 }); 429 431 } else { … … 477 479 $('#'+id).siblings('tr.hidden').addBack().remove(); 478 480 id = id.substr( id.lastIndexOf('-') + 1 ); 479 481 480 // Show the post row and move focus back to the Quick Edit link. 481 $( this.what + id ).show().find( '.editinline' ).focus(); 482 // Show the post row and move focus back to the Quick Edit button. 483 $( this.what + id ).show().find( '.editinline' ) 484 .attr( 'aria-expanded', 'false' ) 485 .focus(); 482 486 } 483 487 } 484 488