Make WordPress Core

Changeset 64013


Ignore:
Timestamp:
09/30/2026 04:25:22 AM (5 weeks ago)
Author:
peterwilsoncc
Message:

Network and Sites: Improve a11y of network admin pages.

Improves the accessibility of two network/multisite related admin screens:

  • My sites: Converts site name and "Global Settings" (available via filter) headings to h2 to avoid skipping a heading level
  • Network setup:
    • associates fields with their descriptive text with aria-describedby attributes
    • converts section headings to h2 to avoid skipping a heading level

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13819

Props mitgiselle, johnjamesjacoby, afercia.
Fixes #66205.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r61753 r64013  
    241241        if ( allow_subdomain_install() && allow_subdirectory_install() ) :
    242242                ?>
    243                 <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3>
     243                <h2><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h2>
    244244                <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.' ); ?>
    245245                        <strong><?php _e( 'You cannot change this later.' ); ?></strong></p>
    … …  
    290290        if ( $is_www ) :
    291291                ?>
    292                 <h3><?php esc_html_e( 'Server Address' ); ?></h3>
     292                <h2><?php esc_html_e( 'Server Address' ); ?></h2>
    293293                <p>
    294294                <?php
    … …  
    318318                <?php endif; ?>
    319319
    320                 <h3><?php esc_html_e( 'Network Details' ); ?></h3>
     320                <h2><?php esc_html_e( 'Network Details' ); ?></h2>
    321321                <table class="form-table" role="presentation">
    322322                <?php if ( 'localhost' === $hostname ) : ?>
    … …  
    379379                                <th scope='row'><label for="sitename"><?php esc_html_e( 'Network Title' ); ?></label></th>
    380380                                <td>
    381                                         <input name='sitename' id='sitename' type='text' size='45' value='<?php echo esc_attr( $site_name ); ?>' />
    382                                         <p class="description">
     381                                        <input name='sitename' id='sitename' type='text' size='45' aria-describedby='sitename-desc' value='<?php echo esc_attr( $site_name ); ?>' />
     382                                        <p class="description" id="sitename-desc">
    383383                                                <?php _e( 'What would you like to call your network?' ); ?>
    384384                                        </p>
    … …  
    388388                                <th scope='row'><label for="email"><?php esc_html_e( 'Network Admin Email' ); ?></label></th>
    389389                                <td>
    390                                         <input name='email' id='email' type='text' size='45' value='<?php echo esc_attr( $admin_email ); ?>' />
    391                                         <p class="description">
     390                                        <input name='email' id='email' type='text' size='45' aria-describedby='email-desc' value='<?php echo esc_attr( $admin_email ); ?>' />
     391                                        <p class="description" id="email-desc">
    392392                                                <?php _e( 'Your email address.' ); ?>
    393393                                        </p>
    … …  
    471471        if ( $_POST || ! is_multisite() ) {
    472472                ?>
    473                 <h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
     473                <h2><?php esc_html_e( 'Enabling the Network' ); ?></h2>
    474474                <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
    475475                <?php
  • trunk/src/wp-admin/my-sites.php

    r61444 r64013  
    125125
    126126        if ( $settings_html ) {
    127                 echo '<h3>' . __( 'Global Settings' ) . '</h3>';
     127                echo '<h2>' . __( 'Global Settings' ) . '</h2>';
    128128                echo $settings_html;
    129129        }
    … …  
    135135
    136136                echo '<li>';
    137                 echo "<h3>{$user_blog->blogname}</h3>";
     137                echo "<h2>{$user_blog->blogname}</h2>";
    138138
    139139                $actions = "<a href='" . esc_url( home_url() ) . "'>" . __( 'Visit' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.