Changeset 38197
- Timestamp:
- 08/04/2016 09:06:31 PM (9 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-admin/js/updates.js
r38188 r38197 454 454 } 455 455 $message.removeClass( 'updating-message notice-warning' ).addClass( 'notice-error' ).find( 'p' ).html( errorMessage ); 456 457 if ( response.pluginName ) { 458 $message.find( 'p' ) 459 .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) ); 460 } else { 461 $message.find( 'p' ).removeAttr( 'aria-label' ); 462 } 456 463 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { 457 464 $card = $( '.plugin-card-' + response.slug ) … … 468 475 $card.find( '.update-now' ) 469 476 .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) ); 477 } else { 478 $card.find( '.update-now' ).removeAttr( 'aria-label' ); 470 479 } 471 480 … … 1592 1601 $( '.button.updating-message' ) 1593 1602 .removeClass( 'updating-message' ) 1594 . attr( 'aria-label', wp.updates.l10n.updateFailedShort)1603 .removeAttr( 'aria-label' ) 1595 1604 .prop( 'disabled', true ) 1596 1605 .text( wp.updates.l10n.updateFailedShort ); … … 1599 1608 .removeClass( 'updating-message notice-warning' ) 1600 1609 .addClass( 'notice-error' ) 1601 .find( 'p' ).text( errorMessage ); 1610 .find( 'p' ) 1611 .removeAttr( 'aria-label' ) 1612 .text( errorMessage ); 1602 1613 1603 1614 wp.a11y.speak( errorMessage, 'assertive' );
Note: See TracChangeset
for help on using the changeset viewer.