From a3e9876c39eb4d37cd4541b01a39e80361d0824f Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 15 Nov 2016 16:00:41 +0000 Subject: [PATCH] Accessibility: Improve the Post Attributes meta box fields labels. With [38951] the support for custom page templates has been extended to all post types. By making the visible meta box titles real labels, accessibility improves for all users and form fields have meaningful labels. Fixes #38790. git-svn-id: https://develop.svn.wordpress.org/trunk@39247 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/edit.css | 9 +++++++++ src/wp-admin/includes/meta-boxes.php | 17 +++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 5ee57f3051..d33f1077f9 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -628,6 +628,15 @@ span.wp-media-buttons-icon:before { width: 250px; } +.post-attributes-label-wrapper { + margin-bottom: 0.5em; +} + +.post-attributes-label { + vertical-align: baseline; + font-weight: 600; +} + #post-visibility-select { line-height: 1.5em; margin-top: 3px; diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 13d463d2c9..945ffd51e4 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -813,8 +813,7 @@ function page_attributes_meta_box($post) { $pages = wp_dropdown_pages( $dropdown_args ); if ( ! empty($pages) ) : ?> -

- +

0 && get_option( 'page_for_posts' ) != $post->ID ) : $template = ! empty( $post->page_template ) ? $post->page_template : false; ?> -

-

+

+ post_type && get_current_screen()->get_help_tabs() ) : ?>