Accessibility: Remove target=_blank from the help tab links on several admin screens.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.

Built from https://develop.svn.wordpress.org/trunk@38725


git-svn-id: http://core.svn.wordpress.org/trunk@38668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-10-04 20:27:33 +00:00
parent 62a43623a4
commit 86ad7855be
12 changed files with 34 additions and 34 deletions

View File

@ -378,8 +378,8 @@ if ( 'post' == $post_type ) {
get_current_screen()->set_help_sidebar(
'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'tools.php') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Posts_Add_New_Screen">Documentation on Writing and Editing Posts</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
} elseif ( 'page' == $post_type ) {
$about_pages = '<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>' .
@ -393,9 +393,9 @@ if ( 'post' == $post_type ) {
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Add_New_Screen">Documentation on Adding New Pages</a>') . '</p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages">Documentation on Editing Pages</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
} elseif ( 'attachment' == $post_type ) {
get_current_screen()->add_help_tab( array(
@ -410,8 +410,8 @@ if ( 'post' == $post_type ) {
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
}

View File

@ -57,13 +57,13 @@ get_current_screen()->add_help_tab( array(
'content' =>
'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen">Documentation on Creating Links</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
);
require_once( ABSPATH . 'wp-admin/admin-header.php' );

View File

@ -299,13 +299,13 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t
$help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
if ( 'category' == $taxonomy )
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>';
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen">Documentation on Categories</a>' ) . '</p>';
elseif ( 'link_category' == $taxonomy )
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>';
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>';
else
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>';
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen">Documentation on Tags</a>' ) . '</p>';
$help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
$help .= '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>';
get_current_screen()->set_help_sidebar( $help );

View File

@ -173,7 +173,7 @@ if ( $doaction ) {
*
* @param string $sendback The redirect URL.
* @param string $doaction The action being taken.
* @param array $post_ids The post IDs to take the action on.
* @param array $post_ids The post IDs to take the action on.
*/
$sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids );
break;
@ -236,8 +236,8 @@ if ( 'post' == $post_type ) {
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen" target="_blank">Documentation on Managing Posts</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen">Documentation on Managing Posts</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
} elseif ( 'page' == $post_type ) {
@ -257,8 +257,8 @@ if ( 'post' == $post_type ) {
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen">Documentation on Managing Pages</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
}

View File

@ -51,8 +51,8 @@ get_current_screen()->add_help_tab( array(
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen" target="_blank">Documentation on Export</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen">Documentation on Export</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
// If the 'download' URL parameter is set, a WXR export file is baked and returned.

View File

@ -26,8 +26,8 @@ get_current_screen()->add_help_tab( array(
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen" target="_blank">Documentation on Import</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen">Documentation on Import</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
if ( current_user_can( 'install_plugins' ) ) {

View File

@ -95,8 +95,8 @@ unset( $help );
$screen->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
'<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Screen">Documentation on Dashboard</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
);
include( ABSPATH . 'wp-admin/admin-header.php' );

View File

@ -74,8 +74,8 @@ get_current_screen()->add_help_tab( array(
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Links_Screen">Documentation on Managing Links</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
get_current_screen()->set_screen_reader_content( array(

View File

@ -53,8 +53,8 @@ get_current_screen()->add_help_tab( array(
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen" target="_blank">Documentation on Uploading Media Files</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen">Documentation on Uploading Media Files</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
require_once( ABSPATH . 'wp-admin/admin-header.php' );

View File

@ -80,8 +80,8 @@ case 'edit' :
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
require( ABSPATH . 'wp-admin/admin-header.php' );

View File

@ -567,8 +567,8 @@ endif;
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="https://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
'<p>' . __('<a href="https://codex.wordpress.org/Appearance_Menus_Screen">Documentation on Menus</a>') . '</p>' .
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
);
// Get the admin header.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38724';
$wp_version = '4.7-alpha-38725';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.