WordPress.org

Make WordPress Core

Changeset 48479


Ignore:
Timestamp:
07/14/2020 03:44:16 PM (2 months ago)
Author:
afercia
Message:

Accessibility: Security: Improves the accessible audible messages for Plugins & Themes Auto-Updates.

  • changes the politeness level of the two error messages introduced in [47835] to assertive
  • remove unnecessary polite parameters as that's the default value

See #50512, #50052.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/updates.js

    r48451 r48479  
    454454            .text( _x( 'Updated!', 'plugin' ) );
    455455
    456         wp.a11y.speak( __( 'Update completed successfully.' ), 'polite' );
     456        wp.a11y.speak( __( 'Update completed successfully.' ) );
    457457
    458458        wp.updates.decrementCount( 'plugin' );
     
    599599            .text( __( 'Installing...' ) );
    600600
    601         wp.a11y.speak( __( 'Installing... please wait.' ), 'polite' );
     601        wp.a11y.speak( __( 'Installing... please wait.' ) );
    602602
    603603        // Remove previous error messages, if any.
     
    635635            .text( _x( 'Installed!', 'plugin' ) );
    636636
    637         wp.a11y.speak( __( 'Installation completed successfully.' ), 'polite' );
     637        wp.a11y.speak( __( 'Installation completed successfully.' ) );
    638638
    639639        $document.trigger( 'wp-plugin-install-success', response );
     
    769769            .text( __( 'Run Importer' ) );
    770770
    771         wp.a11y.speak( __( 'Installation completed successfully.' ), 'polite' );
     771        wp.a11y.speak( __( 'Installation completed successfully.' ) );
    772772
    773773        $document.trigger( 'wp-importer-install-success', response );
     
    852852        }
    853853
    854         wp.a11y.speak( __( 'Deleting...' ), 'polite' );
     854        wp.a11y.speak( __( 'Deleting...' ) );
    855855
    856856        $document.trigger( 'wp-plugin-deleting', args );
     
    947947        } );
    948948
    949         wp.a11y.speak( _x( 'Deleted!', 'plugin' ), 'polite' );
     949        wp.a11y.speak( _x( 'Deleted!', 'plugin' ) );
    950950
    951951        $document.trigger( 'wp-plugin-delete-success', response );
     
    10561056        }
    10571057
    1058         wp.a11y.speak( __( 'Updating... please wait.' ), 'polite' );
     1058        wp.a11y.speak( __( 'Updating... please wait.' ) );
    10591059        $notice.text( __( 'Updating...' ) );
    10601060
     
    11181118
    11191119        wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) );
    1120         wp.a11y.speak( __( 'Update completed successfully.' ), 'polite' );
     1120        wp.a11y.speak( __( 'Update completed successfully.' ) );
    11211121
    11221122        wp.updates.decrementCount( 'theme' );
     
    11751175        } );
    11761176
    1177         wp.a11y.speak( errorMessage, 'polite' );
     1177        wp.a11y.speak( errorMessage );
    11781178
    11791179        $document.trigger( 'wp-theme-update-error', response );
     
    12171217            .text( __( 'Installing...' ) );
    12181218
    1219         wp.a11y.speak( __( 'Installing... please wait.' ), 'polite' );
     1219        wp.a11y.speak( __( 'Installing... please wait.' ) );
    12201220
    12211221        // Remove previous error messages, if any.
     
    12561256            .text( _x( 'Installed!', 'theme' ) );
    12571257
    1258         wp.a11y.speak( __( 'Installation completed successfully.' ), 'polite' );
     1258        wp.a11y.speak( __( 'Installation completed successfully.' ) );
    12591259
    12601260        setTimeout( function() {
     
    14041404        }
    14051405
    1406         wp.a11y.speak( __( 'Deleting...' ), 'polite' );
     1406        wp.a11y.speak( __( 'Deleting...' ) );
    14071407
    14081408        // Remove previous error messages, if any.
     
    14671467        }
    14681468
    1469         wp.a11y.speak( _x( 'Deleted!', 'theme' ), 'polite' );
     1469        wp.a11y.speak( _x( 'Deleted!', 'theme' ) );
    14701470
    14711471        $document.trigger( 'wp-theme-delete-success', response );
     
    19971997            }
    19981998
    1999             wp.a11y.speak( __( 'Update canceled.' ), 'polite' );
     1999            wp.a11y.speak( __( 'Update canceled.' ) );
    20002000        } );
    20012001
     
    20752075                        .text( __( 'Install Now' ) );
    20762076
    2077                     wp.a11y.speak( __( 'Update canceled.' ), 'polite' );
     2077                    wp.a11y.speak( __( 'Update canceled.' ) );
    20782078                } );
    20792079            }
     
    21182118                        .text( __( 'Install Now' ) );
    21192119
    2120                     wp.a11y.speak( __( 'Update canceled.' ), 'polite' );
     2120                    wp.a11y.speak( __( 'Update canceled.' ) );
    21212121                } );
    21222122            }
     
    27832783
    27842784                        $parent.find( '.notice.notice-error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage );
    2785                         wp.a11y.speak( errorMessage, 'polite' );
     2785                        wp.a11y.speak( errorMessage, 'assertive' );
    27862786                        return;
    27872787                    }
     
    28452845                        .text( __( 'The request could not be completed.' ) );
    28462846
    2847                     wp.a11y.speak( __( 'The request could not be completed.' ), 'polite' );
     2847                    wp.a11y.speak( __( 'The request could not be completed.' ), 'assertive' );
    28482848                } )
    28492849                .always( function() {
Note: See TracChangeset for help on using the changeset viewer.