From 34535097b7ded7607ef3eaf84d774a6284dfac4a Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 24 Jul 2012 00:15:15 +0000 Subject: [PATCH] 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. git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 6 +-- wp-admin/edit-form-comment.php | 12 ++--- wp-admin/edit-link-form.php | 6 +-- wp-admin/edit-tag-form.php | 3 ++ wp-admin/edit-tags.php | 4 +- .../includes/class-wp-posts-list-table.php | 2 +- .../class-wp-theme-install-list-table.php | 2 +- .../includes/class-wp-themes-list-table.php | 2 +- wp-admin/includes/dashboard.php | 10 ++-- wp-admin/includes/meta-boxes.php | 48 +++++++++---------- wp-admin/includes/template.php | 30 ++++++------ wp-admin/menu-header.php | 17 ++++--- wp-admin/plugin-editor.php | 6 +-- wp-admin/press-this.php | 14 +++--- wp-admin/theme-editor.php | 4 +- wp-includes/class-wp-editor.php | 10 ++-- wp-includes/general-template.php | 8 ++-- wp-includes/js/tinymce/wp-mce-help.php | 8 ++-- wp-login.php | 20 ++++---- 19 files changed, 108 insertions(+), 104 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 6eddf5dd58..823a7a235d 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -283,7 +283,7 @@ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
- +
-post_content, 'content', array('dfw' => true, 'tabindex' => 1, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?> +post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?> @@ -378,7 +378,7 @@ if ( post_type_supports( $post_type, 'comments' ) ) wp_comment_reply(); ?> -post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> +post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message']) ) : ?> diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 2340baf4f3..14a2966804 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -31,7 +31,7 @@ if ( !defined('ABSPATH') ) - + - + - +
0' ); ?>
@@ -42,7 +42,7 @@ if ( !defined('ABSPATH') ) _e( 'E-mail:' ); } ?>
@@ -53,7 +53,7 @@ if ( !defined('ABSPATH') ) } else { _e( 'URL:' ); } ?>
@@ -98,8 +98,8 @@ $datef = __( 'M j, Y @ G:i' ); $stamp = __('Submitted on: %1$s'); $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); ?> -  -
+  +
@@ -110,7 +110,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "\n"; ?>
- '4' ) ); ?> +
diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 4ae317b898..6d81ec0144 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -82,7 +82,7 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>

- +

@@ -90,7 +90,7 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>

- +

http://wordpress.org/ — don’t forget the http://'); ?>

@@ -98,7 +98,7 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>

- +

diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 24efd82f88..0d4a121bd3 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -91,3 +91,6 @@ submit_button( __('Update') ); ?> + diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 4d619ef235..29bcad4289 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -408,7 +408,9 @@ do_action($taxonomy . '_add_form', $taxonomy); - + inline_edit(); ?>
- +

  • -
  • +
  • diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index 003d1ab03d..76cfa562ad 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -171,7 +171,7 @@ class WP_Themes_List_Table extends WP_List_Table {
  • -
  • +
  • diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 6e3b1cc758..3f72398326 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -505,7 +505,7 @@ function wp_dashboard_quick_press() {

    - +
    @@ -516,14 +516,14 @@ function wp_dashboard_quick_press() {

    - +

    - +

    @@ -531,10 +531,10 @@ function wp_dashboard_quick_press() { - 'save-post', 'tabindex'=> 4 ) ); ?> + 'save-post' ) ); ?> - +
    diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 2146b84c56..d5b0fbdf55 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -28,9 +28,9 @@ function post_submit_meta_box($post) {

    post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> -post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> +post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" class="button button-highlighted" /> post_status && $can_publish ) { ?> - +
    @@ -48,7 +48,7 @@ if ( 'publish' == $post->post_status ) { $preview_button = __( 'Preview' ); } ?> - +
    @@ -81,11 +81,11 @@ switch ( $post->post_status ) { ?> post_status || 'private' == $post->post_status || $can_publish ) { ?> -post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'> +post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js">
    - post_status ) : ?> post_status, 'publish' ); ?> value='publish'> post_status ) : ?> @@ -137,7 +137,7 @@ echo esc_html( $visibility_trans ); ?> />
    -ID ) ); ?> tabindex="4" />
    +ID ) ); ?> />
    />

    @@ -177,8 +177,8 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
    - -
    + +
    @@ -208,19 +208,19 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 if ( $can_publish ) : if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> - '5', 'accesskey' => 'p' ) ); ?> + 'p' ) ); ?> - '5', 'accesskey' => 'p' ) ); ?> + 'p' ) ); ?> - '5', 'accesskey' => 'p' ) ); ?> + 'p' ) ); ?> - +
    @@ -288,7 +288,7 @@ function post_tags_meta_box($post, $box) {
    labels->add_new_item; ?>

    -

    +

    labels->separate_items_with_commas ); ?>

    @@ -320,8 +320,8 @@ function post_categories_meta_box( $post, $box ) { ?>
    "; diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 75417a6c80..64e3310af4 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -226,7 +226,7 @@ foreach ( $plugin_files as $plugin_file ) :
    -
    +
    @@ -244,9 +244,9 @@ foreach ( $plugin_files as $plugin_file ) : "; - submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); + submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false ); } else { - submit_button( __( 'Update File' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); + submit_button( __( 'Update File' ), 'primary', 'submit', false ); } ?>

    diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 9a6181673a..badd2c592c 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -495,8 +495,8 @@ $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace(