[wp-trac] [WordPress Trac] #61979: Proposal: Improve Accessibility of WordPress Admin Dashboard for Screen Reader Users in Version 6.6.1

WordPress Trac noreply at wordpress.org
Wed Sep 4 06:05:36 UTC 2024


#61979: Proposal: Improve Accessibility of WordPress Admin Dashboard for Screen
Reader Users in Version 6.6.1
-------------------------------------------------+-------------------------
 Reporter:  agencedetectivenord                  |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Administration                       |     Version:  6.6.1
 Severity:  normal                               |  Resolution:
 Keywords:  accessibility screen readers ARIA    |     Focuses:
  focus management keyboard shortcuts WordPress  |
  6.6.1                                          |
-------------------------------------------------+-------------------------

Comment (by agencedetectivenord):

 {{{ #!diff
 diff --git a/wp-admin/includes/admin-filters.php b/wp-admin/includes
 /admin-filters.php
 index abcdefg..hijklmn 100644
 --- a/wp-admin/includes/admin-filters.php
 +++ b/wp-admin/includes/admin-filters.php
 @@ -25,6 +25,12 @@ function some_existing_function() {
     // Existing code...

 +    // Example: Adding ARIA landmarks to main navigation.
 +    echo '<nav aria-label="Main Navigation" role="navigation">';
 +    // Navigation items...
 +    echo '</nav>';
 +
 +    // Focus management for modals.
 +    wp_enqueue_script( 'focus-management', plugin_dir_url( __FILE__ ) .
 'js/focus-management.js', array( 'jquery' ), '1.0', true );
 }

 diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js
 index opqrstu..vwxyzab 100644
 --- a/wp-admin/js/common.js
 +++ b/wp-admin/js/common.js
 @@ -85,6 +85,12 @@ jQuery(document).ready(function($) {
     // Existing JavaScript code...

 +    // Adding ARIA labels to buttons.
 +    $('.wp-admin-button').attr('aria-label', function() {
 +        return $(this).text() + ' button';
 +    });
 +
 +    // Managing focus for modals.
 +    $(document).on('shown.bs.modal', function () {
 +        $('.modal:visible').focus();
 +    });
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61979#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list