Make WordPress Core

Ticket #47120: 47120.2.diff

File 47120.2.diff, 3.4 KB (added by joedolson, 4 years ago)

Changes a role=alert to aria-live=assertive for consistency. In testing, role=alert double read notices.

  • package-lock.json

     
    56315631                        "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==",
    56325632                        "dev": true
    56335633                },
    5634                 "browser-resolve": {
    5635                         "version": "1.11.3",
    5636                         "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
    5637                         "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
    5638                         "dev": true,
    5639                         "requires": {
    5640                                 "resolve": "1.1.7"
    5641                         },
    5642                         "dependencies": {
    5643                                 "resolve": {
    5644                                         "version": "1.1.7",
    5645                                         "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
    5646                                         "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
    5647                                         "dev": true
    5648                                 }
    5649                         }
    5650                 },
    56515634                "browserify-aes": {
    56525635                        "version": "1.2.0",
    56535636                        "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
  • src/js/media/views/uploader/inline.js

     
    115115
    116116                        $browser.detach().text( $placeholder.text() );
    117117                        $browser[0].className = $placeholder[0].className;
     118                        $browser[0].setAttribute( 'aria-labelledby', $browser[0].id + ' ' + $placeholder[0].getAttribute('aria-labelledby') );
    118119                        $placeholder.replaceWith( $browser.show() );
    119120                }
    120121
  • src/js/media/views/uploader/status.js

     
    118118
    119119                // Can show additional info here while retrying to create image sub-sizes.
    120120                this.views.add( '.upload-errors', statusError, { at: 0 } );
     121                this.$el.attr( 'tabindex', '-1' ).trigger( 'focus' );
    121122        },
    122123
    123124        dismiss: function() {
  • src/wp-includes/media-template.php

     
    252252                        <div class="upload-ui">
    253253                                <h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files to upload' ); ?></h2>
    254254                                <p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
    255                                 <button type="button" class="browser button button-hero"><?php _e( 'Select Files' ); ?></button>
     255                                <button type="button" class="browser button button-hero" aria-labelledby="post-upload-info"><?php _e( 'Select Files' ); ?></button>
    256256                        </div>
    257257
    258                         <div class="upload-inline-status"></div>
     258                        <div class="upload-inline-status" aria-live="assertive"></div>
    259259
    260                         <div class="post-upload-ui">
     260                        <div class="post-upload-ui" id="post-upload-info">
    261261                                <?php
    262262                                /** This action is documented in wp-admin/includes/media.php */
    263263                                do_action( 'pre-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
     
    330330                        <span class="upload-detail-separator">&ndash;</span>
    331331                        <span class="upload-filename"></span>
    332332                </div>
    333                 <div class="upload-errors"></div>
     333                <div class="upload-errors" aria-live="assertive"></div>
    334334        </script>
    335335
    336336        <?php // Template for the uploading status errors. ?>