Changeset 37228
- Timestamp:
- 04/17/2016 11:08:17 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r37174 r37228 441 441 } 442 442 } ) 443 // Returns a jQuery object containing the menu element. 443 444 .autocomplete( 'widget' ) 444 445 .addClass( 'wplink-autocomplete' ) 445 446 .attr( 'role', 'listbox' ) 446 .removeAttr( 'tabindex' ); // Remove the `tabindex=0` attribute added by jQuery UI. 447 .removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI. 448 /* 449 * Looks like Safari and VoiceOver need an `aria-selected` attribute. See ticket #33301. 450 * The `menufocus` and `menublur` events are the same events used to add and remove 451 * the `ui-state-focus` CSS class on the menu items. See jQuery UI Menu Widget. 452 */ 453 .on( 'menufocus', function( event, ui ) { 454 ui.item.attr( 'aria-selected', 'true' ); 455 }) 456 .on( 'menublur', function() { 457 /* 458 * The `menublur` event returns an object where the item is `null` 459 * so we need to find the active item with other means. 460 */ 461 $( this ).find( '[aria-selected="true"]' ).removeAttr( 'aria-selected' ); 462 }); 447 463 } 448 464
Note: See TracChangeset
for help on using the changeset viewer.