From 83f90bf8510807d71da5a1b61a33af04497ebabd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 28 Oct 2015 17:56:22 +0000 Subject: [PATCH] Dashboard: make tags used for headings more semantic. Props Cheffheid, afercia. Fixes #33558. git-svn-id: https://develop.svn.wordpress.org/trunk@35414 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/common.css | 20 +++++----- src/wp-admin/css/dashboard.css | 58 ++++++++++++----------------- src/wp-admin/includes/dashboard.php | 24 ++++++------ 3 files changed, 45 insertions(+), 57 deletions(-) diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index c084b2028c..62c9da4381 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -564,25 +564,23 @@ code { margin: 10px 20px 0 2px; } -.wrap > h2:first-child, /* Back-compat for old plugins */ -.wrap h1, -.subtitle { - font-weight: normal; - margin: 0; -} - -.wrap > h2:first-child, /* Back-compat for old plugins */ +.wrap > h2:first-child, /* Back-compat for pre-4.4 */ +.wrap [class$="icon32"] + h2, /* Back-compat for pre-4.4 */ +.postbox .inside h2, /* Back-compat for pre-4.4 */ .wrap h1 { font-size: 23px; font-weight: 400; + margin: 0; padding: 9px 15px 4px 0; line-height: 29px; } .subtitle { + margin: 0; + padding-left: 25px; color: #777; font-size: 14px; - padding-left: 25px; + font-weight: normal; } .wrap .add-new-h2, /* deprecated */ @@ -2058,10 +2056,10 @@ h2 .nav-tab { margin-right: 190px; } -.metabox-holder h3.hndle, /* Back-compat for pre-4.4 */ .metabox-holder .stuffbox > h3, /* Back-compat for pre-4.4 */ .metabox-holder .postbox > h3, /* Back-compat for pre-4.4 */ -.metabox-holder h2 { +.metabox-holder h3.hndle, /* Back-compat for pre-4.4 */ +.metabox-holder h2.hndle { font-size: 14px; padding: 8px 12px; margin: 0; diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 6f4f53bb32..fd12039970 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -115,14 +115,14 @@ line-height: 2.1em; } -.welcome-panel h3 { +.welcome-panel h2 { margin: 0; font-size: 21px; font-weight: normal; line-height: 1.2; } -.welcome-panel h4 { +.welcome-panel h3 { margin: 1.33em 0 0; font-size: 16px; } @@ -360,8 +360,11 @@ body #dashboard-widgets .postbox form .submit { overflow: hidden; } -#dashboard-widgets h4.mu-storage { - margin-bottom: 10px; +#dashboard-widgets h3.mu-storage { + margin: 0 0 10px; + padding: 0; + font-size: 14px; + font-weight: normal; } /* Dashboard right now - Colors */ @@ -378,7 +381,7 @@ body #dashboard-widgets .postbox form .submit { padding: 10px 12px 6px 12px; } -#dashboard_right_now .sub h4 { +#dashboard_right_now .sub h3 { color: #555; } @@ -537,11 +540,6 @@ form.initial-form.quickpress-open input#title { border: none; } -#dashboard_quick_press .drafts h4 { - margin: 0 12px 8px; - font-weight: normal; -} - #dashboard_quick_press .drafts .view-all { float: right; margin: 0 12px 0 0; @@ -576,20 +574,25 @@ form.initial-form.quickpress-open input#title { margin: 0 5px 0 0; } -/* Dashboard activity widget */ +/* Dashboard common styles */ -#dashboard-widgets #dashboard_activity h4 { - margin: 0 0 8px 12px; +#dashboard-widgets h4, /* Back-compat for pre-4.4 */ +#dashboard-widgets h3, +#dashboard_quick_press .drafts h2 { + margin: 0 12px 8px; + padding: 0; + font-size: 14px; font-weight: normal; + color: #23282d; } -#dashboard-widgets #dashboard_activity h4.comment-meta { - margin: 0; +#dashboard-widgets .inside h4, /* Back-compat for pre-4.4 */ +#dashboard-widgets .inside h3 { + margin-left: 0; + margin-right: 0; } -#dashboard_activity h4.comment-meta { - margin-bottom: 4px; -} +/* Dashboard activity widget */ #dashboard_activity ul { padding: 0 12px; @@ -708,11 +711,6 @@ form.initial-form.quickpress-open input#title { margin: 1em 0; } -#activity-widget #the-comment-list .comment-item h4 { - font-size: 13px; - color: #999; -} - #activity-widget #the-comment-list .comment-item p.row-actions { margin: 4px 0 0 0; } @@ -794,14 +792,6 @@ h3:hover .edit-box { right: 33px; } -#dashboard-widgets h4 { - color: #23282d; - font-weight: normal; - font-size: 14px; - margin: 0 0 .2em; - padding: 0; -} - #dashboard_plugins h5 { font-size: 14px; } @@ -834,13 +824,13 @@ h3:hover .edit-box { border-top: none; } -#latest-comments #the-comment-list .comment-item h4 { +#latest-comments #the-comment-list .comment-meta { line-height: 1.5em; - margin-top: 0; + margin: 0; color: #666; } -#latest-comments #the-comment-list .comment-item h4 cite { +#latest-comments #the-comment-list .comment-meta cite { font-style: normal; font-weight: normal; } diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 7f876943b6..a85855d743 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -540,9 +540,9 @@ function wp_dashboard_recent_drafts( $drafts = false ) { echo '
'; if ( count( $drafts ) > 3 ) { - echo '

' . _x( 'View all', 'drafts' ) . "

\n"; + echo '

' . _x( 'View all', 'drafts' ) . "

\n"; } - echo '

' . __( 'Drafts' ) . "

\n