Make WordPress Core


Ignore:
Timestamp:
10/01/2017 01:47:29 PM (7 years ago)
Author:
afercia
Message:

Accessibility: Improve the Theme Details modal accessibility.

  • sets the modal content to role="document" to make screen readers switch back to browse mode
  • standardizes the Themes screen and Customizer modals interaction
  • Themes screen modal: sets initial focus on the modal overlay instead of the primary button, avoiding to "skip" content for keyboard and screen reader users

Fixes #42055.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/themes.php

    r41608 r41658  
    302302    </div>
    303303</div>
    304 <div class="theme-overlay"></div>
     304<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
    305305
    306306<p class="no-themes"><?php _e( 'No themes found. Try a different search query.' ); ?></p>
     
    432432<script id="tmpl-theme-single" type="text/template">
    433433    <div class="theme-backdrop"></div>
    434     <div class="theme-wrap wp-clearfix">
     434    <div class="theme-wrap wp-clearfix" role="document">
    435435        <div class="theme-header">
    436436            <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
Note: See TracChangeset for help on using the changeset viewer.