Make WordPress Core


Ignore:
Timestamp:
05/12/2009 10:40:56 PM (15 years ago)
Author:
markjaquith
Message:

Use a semantic class name for text targeted to screen readers. props filosofo. fixes #9791

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-page-form.php

    r11245 r11312  
    262262<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
    263263<h4><?php _e( 'Page Password' ); ?></h4>
    264 <p><label class="invisible" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p>
     264<p><label class="screen-reader-text" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p>
    265265<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
    266266<?php
     
    278278?>
    279279<h5><?php _e('Parent') ?></h5>
    280 <label class="invisible" for="parent_id"><?php _e('Page Parent') ?></label>
     280<label class="screen-reader-text" for="parent_id"><?php _e('Page Parent') ?></label>
    281281<?php wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>
    282282<p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
     
    284284    if ( 0 != count( get_page_templates() ) ) { ?>
    285285<h5><?php _e('Template') ?></h5>
    286 <label class="invisible" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
     286<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
    287287<option value='default'><?php _e('Default Template'); ?></option>
    288288<?php page_template_dropdown($post->page_template); ?>
     
    292292    } ?>
    293293<h5><?php _e('Order') ?></h5>
    294 <p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p>
     294<p><label class="screen-reader-text" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p>
    295295<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)'); ?></p>
    296296<?php
     
    347347function page_slug_meta_box($post){
    348348?>
    349 <label class="invisible" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $post->post_name ); ?>" />
     349<label class="screen-reader-text" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $post->post_name ); ?>" />
    350350<?php
    351351}
     
    369369            $authors[] = $post->post_author;
    370370?>
    371 <label class="invisible" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
     371<label class="screen-reader-text" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
    372372<?php
    373373    }
     
    436436<div id="titlediv">
    437437<div id="titlewrap">
    438     <label class="invisible" for="title"><?php _e('Title') ?></label>
     438    <label class="screen-reader-text" for="title"><?php _e('Title') ?></label>
    439439    <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
    440440</div>
Note: See TracChangeset for help on using the changeset viewer.