Make WordPress Core

Timestamp:
06/21/2024 06:15:50 PM (5 weeks ago)
Author:
joedolson
Message:

Administration: A11y: Add role="alert" on JS injected admin notices.

Add the attribute role="alert" on 12 instances of admin notices that are injected into the DOM using JavaScript. The role="alert" attribute allows screen readers to recognize the addition to the DOM and announce the errors to users.

Props afercia, cyrus11, rcreators, joedolson.
Fixes #47111.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/widgets/custom-html.js

    r51701 r58455  
    149149                }
    150150            } else if ( 0 !== errorAnnotations.length ) {
    151                 errorNotice = $( '<div class="inline notice notice-error notice-alt"></div>' );
     151                errorNotice = $( '<div class="inline notice notice-error notice-alt"></div>' );
    152152                errorNotice.append( $( '<p></p>', {
    153153                    text: message
Note: See TracChangeset for help on using the changeset viewer.