Make WordPress Core

Changeset 32720


Ignore:
Timestamp:
06/10/2015 09:08:10 AM (9 years ago)
Author:
obenland
Message:

More semantic markup for the post formats metabox.

Screen readers will now introduce the group of radio buttons.
Also brings the meta box to parity with Press This.

Props joedolson, afercia.
Fixes #26160.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r32642 r32720  
    791791                ?>
    792792                <div id="post-formats-select">
    793                 <fieldset><legend class="screen-reader-text"><?php _e( 'Post formats' ); ?></legend>
     793                <fieldset><legend class="screen-reader-text"><?php _e( 'Post Formats' ); ?></legend>
    794794                    <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> />
    795795                    <label for="post-format-0" class="post-format-icon post-format-standard"><?php echo get_post_format_string( 'standard' ); ?></label>
  • trunk/src/wp-admin/includes/meta-boxes.php

    r32642 r32720  
    371371    ?>
    372372    <div id="post-formats-select">
    373         <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0" class="post-format-icon post-format-standard"><?php echo get_post_format_string( 'standard' ); ?></label>
    374         <?php foreach ( $post_formats[0] as $format ) : ?>
    375         <br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
    376         <?php endforeach; ?><br />
     373        <fieldset>
     374            <legend class="screen-reader-text"><?php _e( 'Post Formats' ); ?></legend>
     375            <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0" class="post-format-icon post-format-standard"><?php echo get_post_format_string( 'standard' ); ?></label>
     376            <?php foreach ( $post_formats[0] as $format ) : ?>
     377            <br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
     378            <?php endforeach; ?>
     379        </fieldset>
    377380    </div>
    378381    <?php endif; endif;
Note: See TracChangeset for help on using the changeset viewer.