WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/24/2012 12:15:15 AM (8 years ago)
Author:
azaozz
Message:

Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).

Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

File:
1 edited

Legend:

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

    r21075 r21311  
    333333        <div class="inside">
    334334        <label for="author"><?php _e('Name') ?></label>
    335         <input type="text" name="newcomment_author" size="50" value="" tabindex="101" id="author" />
     335        <input type="text" name="newcomment_author" size="50" value="" id="author" />
    336336        </div>
    337337
    338338        <div class="inside">
    339339        <label for="author-email"><?php _e('E-mail') ?></label>
    340         <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
     340        <input type="text" name="newcomment_author_email" size="50" value="" id="author-email" />
    341341        </div>
    342342
    343343        <div class="inside">
    344344        <label for="author-url"><?php _e('URL') ?></label>
    345         <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" />
     345        <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" />
    346346        </div>
    347347        <div style="clear:both;"></div>
     
    351351    <?php
    352352    $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
    353     wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings, 'tabindex' => 104 ) );
     353    wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
    354354    ?>
    355355    </div>
    356356
    357357    <p id="replysubmit" class="submit">
    358     <a href="#comments-form" class="cancel button-secondary alignleft" tabindex="106"><?php _e('Cancel'); ?></a>
    359     <a href="#comments-form" class="save button-primary alignright" tabindex="104">
     358    <a href="#comments-form" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
     359    <a href="#comments-form" class="save button-primary alignright">
    360360    <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
    361361    <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
     
    490490
    491491    $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
    492     $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' />";
     492    $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' type='text' size='20' value='{$entry['meta_key']}' />";
    493493
    494494    $r .= "\n\t\t<div class='submit'>";
    495     $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false, array( 'tabindex' => '6' ) );
     495    $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false );
    496496    $r .= "\n\t\t";
    497     $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false, array( 'tabindex' => '6' ) );
     497    $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false );
    498498    $r .= "</div>";
    499499    $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
    500500    $r .= "</td>";
    501501
    502     $r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
     502    $r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
    503503    return $r;
    504504}
     
    535535<td id="newmetaleft" class="left">
    536536<?php if ( $keys ) { ?>
    537 <select id="metakeyselect" name="metakeyselect" tabindex="7">
     537<select id="metakeyselect" name="metakeyselect">
    538538<option value="#NONE#"><?php _e( '&mdash; Select &mdash;' ); ?></option>
    539539<?php
     
    544544?>
    545545</select>
    546 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" />
     546<input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
    547547<a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
    548548<span id="enternew"><?php _e('Enter new'); ?></span>
    549549<span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
    550550<?php } else { ?>
    551 <input type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" />
     551<input type="text" id="metakeyinput" name="metakeyinput" value="" />
    552552<?php } ?>
    553553</td>
    554 <td><textarea id="metavalue" name="metavalue" rows="2" cols="25" tabindex="8"></textarea></td>
     554<td><textarea id="metavalue" name="metavalue" rows="2" cols="25"></textarea></td>
    555555</tr>
    556556
    557557<tr><td colspan="2" class="submit">
    558 <?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub', 'tabindex' => '9' ) ); ?>
     558<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub' ) ); ?>
    559559<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
    560560</td></tr>
Note: See TracChangeset for help on using the changeset viewer.