Ticket #50512: 50512.diff
| File 50512.diff, 4.8 KB (added by , 5 years ago) |
|---|
-
src/js/_enqueues/wp/updates.js
453 453 ) 454 454 .text( _x( 'Updated!', 'plugin' ) ); 455 455 456 wp.a11y.speak( __( 'Update completed successfully.' ) , 'polite');456 wp.a11y.speak( __( 'Update completed successfully.' ) ); 457 457 458 458 wp.updates.decrementCount( 'plugin' ); 459 459 … … 598 598 ) 599 599 .text( __( 'Installing...' ) ); 600 600 601 wp.a11y.speak( __( 'Installing... please wait.' ) , 'polite');601 wp.a11y.speak( __( 'Installing... please wait.' ) ); 602 602 603 603 // Remove previous error messages, if any. 604 604 $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove(); … … 634 634 ) 635 635 .text( _x( 'Installed!', 'plugin' ) ); 636 636 637 wp.a11y.speak( __( 'Installation completed successfully.' ) , 'polite');637 wp.a11y.speak( __( 'Installation completed successfully.' ) ); 638 638 639 639 $document.trigger( 'wp-plugin-install-success', response ); 640 640 … … 768 768 }) 769 769 .text( __( 'Run Importer' ) ); 770 770 771 wp.a11y.speak( __( 'Installation completed successfully.' ) , 'polite');771 wp.a11y.speak( __( 'Installation completed successfully.' ) ); 772 772 773 773 $document.trigger( 'wp-importer-install-success', response ); 774 774 }; … … 851 851 .text( __( 'Deleting...' ) ); 852 852 } 853 853 854 wp.a11y.speak( __( 'Deleting...' ) , 'polite');854 wp.a11y.speak( __( 'Deleting...' ) ); 855 855 856 856 $document.trigger( 'wp-plugin-deleting', args ); 857 857 … … 946 946 } 947 947 } ); 948 948 949 wp.a11y.speak( _x( 'Deleted!', 'plugin' ) , 'polite');949 wp.a11y.speak( _x( 'Deleted!', 'plugin' ) ); 950 950 951 951 $document.trigger( 'wp-plugin-delete-success', response ); 952 952 }; … … 1055 1055 $notice.data( 'originaltext', $notice.html() ); 1056 1056 } 1057 1057 1058 wp.a11y.speak( __( 'Updating... please wait.' ) , 'polite');1058 wp.a11y.speak( __( 'Updating... please wait.' ) ); 1059 1059 $notice.text( __( 'Updating...' ) ); 1060 1060 1061 1061 $document.trigger( 'wp-theme-updating', args ); … … 1117 1117 } 1118 1118 1119 1119 wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) ); 1120 wp.a11y.speak( __( 'Update completed successfully.' ) , 'polite');1120 wp.a11y.speak( __( 'Update completed successfully.' ) ); 1121 1121 1122 1122 wp.updates.decrementCount( 'theme' ); 1123 1123 … … 1174 1174 message: errorMessage 1175 1175 } ); 1176 1176 1177 wp.a11y.speak( errorMessage , 'polite');1177 wp.a11y.speak( errorMessage ); 1178 1178 1179 1179 $document.trigger( 'wp-theme-update-error', response ); 1180 1180 }; … … 1216 1216 ) 1217 1217 .text( __( 'Installing...' ) ); 1218 1218 1219 wp.a11y.speak( __( 'Installing... please wait.' ) , 'polite');1219 wp.a11y.speak( __( 'Installing... please wait.' ) ); 1220 1220 1221 1221 // Remove previous error messages, if any. 1222 1222 $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove(); … … 1255 1255 ) 1256 1256 .text( _x( 'Installed!', 'theme' ) ); 1257 1257 1258 wp.a11y.speak( __( 'Installation completed successfully.' ) , 'polite');1258 wp.a11y.speak( __( 'Installation completed successfully.' ) ); 1259 1259 1260 1260 setTimeout( function() { 1261 1261 … … 1403 1403 .text( __( 'Deleting...' ) ); 1404 1404 } 1405 1405 1406 wp.a11y.speak( __( 'Deleting...' ) , 'polite');1406 wp.a11y.speak( __( 'Deleting...' ) ); 1407 1407 1408 1408 // Remove previous error messages, if any. 1409 1409 $( '.theme-info .update-message' ).remove(); … … 1466 1466 } ); 1467 1467 } 1468 1468 1469 wp.a11y.speak( _x( 'Deleted!', 'theme' ) , 'polite');1469 wp.a11y.speak( _x( 'Deleted!', 'theme' ) ); 1470 1470 1471 1471 $document.trigger( 'wp-theme-delete-success', response ); 1472 1472 }; … … 1996 1996 } 1997 1997 } 1998 1998 1999 wp.a11y.speak( __( 'Update canceled.' ) , 'polite');1999 wp.a11y.speak( __( 'Update canceled.' ) ); 2000 2000 } ); 2001 2001 2002 2002 /** … … 2074 2074 .removeClass( 'updating-message' ) 2075 2075 .text( __( 'Install Now' ) ); 2076 2076 2077 wp.a11y.speak( __( 'Update canceled.' ) , 'polite');2077 wp.a11y.speak( __( 'Update canceled.' ) ); 2078 2078 } ); 2079 2079 } 2080 2080 … … 2117 2117 ) 2118 2118 .text( __( 'Install Now' ) ); 2119 2119 2120 wp.a11y.speak( __( 'Update canceled.' ) , 'polite');2120 wp.a11y.speak( __( 'Update canceled.' ) ); 2121 2121 } ); 2122 2122 } 2123 2123 … … 2782 2782 } 2783 2783 2784 2784 $parent.find( '.notice.notice-error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage ); 2785 wp.a11y.speak( errorMessage, ' polite' );2785 wp.a11y.speak( errorMessage, 'assertive' ); 2786 2786 return; 2787 2787 } 2788 2788 … … 2844 2844 .find( 'p' ) 2845 2845 .text( __( 'The request could not be completed.' ) ); 2846 2846 2847 wp.a11y.speak( __( 'The request could not be completed.' ), ' polite' );2847 wp.a11y.speak( __( 'The request could not be completed.' ), 'assertive' ); 2848 2848 } ) 2849 2849 .always( function() { 2850 2850 $toggler.removeAttr( 'data-doing-ajax' ).find( '.dashicons-update' ).addClass( 'hidden' );