Make WordPress Core


Ignore:
Timestamp:
07/31/2026 08:06:46 PM (8 weeks ago)
Author:
joedolson
Message:

Accessibility: Fix labels in discussion and reading settings.

Items per page, items per feed, and comment link moderation settings used inappropriate structures. For posts per page and items per feed, the label was missing context, provided in an orphaned text string; for the comment link moderation settings, the label used a sentence structure that created mis-ordered labeling for screen reader users. The labels also use numeric interpolations that should require handling plural and singular translations separately.

Alter structure to use appropriate combinations of label and aria-describedy structures, making the labeling more consistent and accessible. Restructures text to remove the need for alternate translations based on number.

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

Props pavelevap, garyj, sergeybiryukov, shailu25, wildworks, johnbillion, chriscct7, afercia, garrett-eclipse, joedolson.
Fixes #29299.

File:
1 edited

Legend:

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

    r62089 r62961  
    176176<?php endif; ?>
    177177<tr>
    178 <th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
     178<th scope="row"><label for="posts_per_page"><?php _e( 'Number of recent posts shown on archive pages' ); ?></label></th>
    179179<td>
    180 <input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
     180<input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" />
    181181</td>
    182182</tr>
    183183<tr>
    184 <th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
    185 <td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td>
     184<th scope="row"><label for="posts_per_rss"><?php _e( 'Number of recent items shown in syndication feeds' ); ?></label></th>
     185<td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /></td>
    186186</tr>
    187187
Note: See TracChangeset for help on using the changeset viewer.