From 70a4da6f049d83024f5d07744b1ca5aeb56d1d74 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 13 Oct 2015 06:56:48 +0000 Subject: [PATCH] Accessibility: bump headings one level up in post meta boxes for a better headings hierarchy. Props afercia, joedolson, wonderboymusic. See #33557. git-svn-id: https://develop.svn.wordpress.org/trunk@35128 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/common.css | 14 +++++++++++-- src/wp-admin/css/dashboard.css | 6 +++--- src/wp-admin/css/edit.css | 21 +++++++++++--------- src/wp-admin/includes/template-functions.php | 2 +- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index eb8c2ca0ec..b16933a958 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -2048,13 +2048,21 @@ h2 .nav-tab { margin-right: 190px; } -.metabox-holder h3 { +.metabox-holder h3.hndle, /* Back-compat for pre-4.4 */ +.metabox-holder .stuffbox > h3, /* Back-compat for pre-4.4 */ +.metabox-holder h2 { font-size: 14px; padding: 8px 12px; margin: 0; line-height: 1.4; } +/* Back-compat for nav-menus screen */ +.nav-menus-php .metabox-holder h3 { + padding: 10px 10px 11px 14px; + line-height: 21px; +} + #templateside ul li a { text-decoration: none; } @@ -3420,7 +3428,9 @@ img { font-size: 14px; } - .metabox-holder h3 { + .metabox-holder h3.hndle, /* Back-compat for pre-4.4 */ + .metabox-holder .stuffbox > h3, /* Back-compat for pre-4.4 */ + .metabox-holder h2 { padding: 12px; } diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 6c145fa8f0..6f4f53bb32 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -947,12 +947,12 @@ a.rsswidget { box-shadow: none; } -#dashboard_browser_nag.postbox.browser-insecure h3 { +#dashboard_browser_nag.postbox.browser-insecure h2 { border-bottom-color: #cd5a5a; color: #fff; } -#dashboard_browser_nag.postbox h3 { +#dashboard_browser_nag.postbox h2 { border-bottom-color: #f6e2ac; background: transparent none; color: #fff; @@ -966,7 +966,7 @@ a.rsswidget { /* Make the browser nags easier to read with Open Sans */ -#dashboard_browser_nag h3.hndle { +#dashboard_browser_nag h2.hndle { border: none; font-weight: 600; font-size: 20px; diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index e8fc844d40..9215c1440f 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -239,8 +239,15 @@ ul.category-tabs li, margin: 8px 0 5px; } +/* Back-compat for pre-4.4 */ #category-adder h4 { + margin: 0; +} + +.taxonomy-add-new { + display: inline-block; margin: 10px 0; + font-weight: 600; } #side-sortables .add-menu-item-tabs, @@ -627,15 +634,9 @@ span.wp-media-buttons-icon:before { position: absolute; } +#poststuff h3.hndle, /* Back-compat for pre-4.4 */ +#poststuff .stuffbox > h3, /* Back-compat for pre-4.4 */ #poststuff h2 { - margin-top: 20px; - font-size: 1.5em; - margin-bottom: 15px; - padding: 0 0 3px; - clear: left; -} - -#poststuff h3 { font-size: 14px; padding: 8px 12px; margin: 0; @@ -1358,7 +1359,9 @@ table.links-table { padding: 10px 10px; } - #poststuff h3 { + #poststuff h3.hndle, /* Back-compat for pre-4.4 */ + #poststuff .stuffbox > h3, /* Back-compat for pre-4.4 */ + #poststuff h2 { padding: 12px; } diff --git a/src/wp-admin/includes/template-functions.php b/src/wp-admin/includes/template-functions.php index 0918bfd86c..b4a91db447 100644 --- a/src/wp-admin/includes/template-functions.php +++ b/src/wp-admin/includes/template-functions.php @@ -1006,7 +1006,7 @@ function do_meta_boxes( $screen, $context, $object ) { echo ''; echo ''; } - echo "

{$box['title']}

\n"; + echo "

{$box['title']}

\n"; echo '
' . "\n"; call_user_func($box['callback'], $object, $box); echo "
\n";