From 347b0bf108a01df032ef76eef9d9cb05f4c1a146 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 28 Oct 2015 23:07:08 +0000 Subject: [PATCH] Media: Improve the headings hierarchy in the Media Views for better accessibility. Fixes #34273. git-svn-id: https://develop.svn.wordpress.org/trunk@35427 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 12 +++++++--- src/wp-admin/includes/image-edit.php | 8 +++---- src/wp-includes/css/media-views.css | 25 ++++++++++++++------- src/wp-includes/media-template.php | 33 ++++++++++++++-------------- 4 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index c83fafc53b..48937571fa 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -500,7 +500,8 @@ border color while dragging a file over the uploader drop area */ color: #c00; } -.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3 { +.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3, /* Back-compat for pre-4.4 */ +.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2 { display: none; } @@ -1017,11 +1018,16 @@ border color while dragging a file over the uploader drop area */ margin: 0 8px 0 0; } -#poststuff .imgedit-group-top h3 { +#poststuff .imgedit-group-top h3, /* Back-compat for pre-4.4 */ +#poststuff .imgedit-group-top h2 { + margin: 0; padding: 0; + font-size: 14px; + line-height: 1.4; } -.imgedit-group-top h3 a { +.imgedit-group-top h3 a, /* Back-compat for pre-4.4 */ +.imgedit-group-top h2 a { text-decoration: none; } diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index e1f9f7ef8c..3977c4335f 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -46,7 +46,7 @@ function wp_image_editor($post_id, $msg = false) {
-

+

@@ -65,7 +65,7 @@ function wp_image_editor($post_id, $msg = false) {
-

+

-

+

@@ -122,7 +122,7 @@ function wp_image_editor($post_id, $msg = false) {
-

+

diff --git a/src/wp-includes/css/media-views.css b/src/wp-includes/css/media-views.css index 7247a93172..1807f3478c 100644 --- a/src/wp-includes/css/media-views.css +++ b/src/wp-includes/css/media-views.css @@ -298,8 +298,10 @@ width: 100%; } -.media-sidebar h3, -.image-details h3 { +.media-sidebar h3, /* Back-compat for pre-4.4 */ +.image-details h3, /* Back-compat for pre-4.4 */ +.media-sidebar h2, +.image-details h2 { position: relative; font-weight: bold; text-transform: uppercase; @@ -1175,7 +1177,8 @@ max-width: 400px; } -.uploader-inline .media-uploader-status h3 { +.uploader-inline .media-uploader-status h3, /* Back-compat for pre-4.4 */ +.uploader-inline .media-uploader-status h2 { display: none; } @@ -1266,7 +1269,8 @@ border: 1px dashed #fff; } -.uploader-window h3 { +.uploader-window h3, /* Back-compat for pre-4.4 */ +.uploader-window h1 { margin: -0.5em 0 0; position: absolute; top: 50%; @@ -1321,7 +1325,8 @@ margin: 0 0 4em; } -.uploader-inline h3 { +.uploader-inline h3, /* Back-compat for pre-4.4 */ +.uploader-inline h2 { font-size: 20px; line-height: 28px; font-weight: 400; @@ -1740,7 +1745,8 @@ padding: 0; } -.media-modal .imgedit-group-top h3 { +.media-modal .imgedit-group-top h3, /* Back-compat for pre-4.4 */ +.media-modal .imgedit-group-top h2 { text-transform: uppercase; font-size: 12px; color: #666; @@ -1748,7 +1754,8 @@ margin-top: 24px; } -.media-modal .imgedit-group-top h3 a { +.media-modal .imgedit-group-top h3 a, /* Back-compat for pre-4.4 */ +.media-modal .imgedit-group-top h2 a { text-decoration: none; color: #666; } @@ -1878,10 +1885,12 @@ left: 0; } -.image-details .column-settings h3 { +.image-details .column-settings h3, /* Back-compat for pre-4.4 */ +.image-details .column-settings h2 { margin: 20px; padding-top: 20px; border-top: 1px solid #ddd; + color: #23282d; } .image-details .column-image { diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index c195d7419f..d57b3991a4 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -171,7 +171,7 @@ function wp_print_media_templates() { @@ -188,19 +188,19 @@ function wp_print_media_templates() { <# } #>
<# if ( data.message ) { #> -

{{ data.message }}

+

{{ data.message }}

<# } #> - -

native app for your device instead.'), 'https://apps.wordpress.org/' ); ?>

- -

+ +

native app for your device instead.' ), 'https://apps.wordpress.org/' ); ?>

+ +

-

+

@@ -257,7 +257,7 @@ function wp_print_media_templates() {