Media: Improve the headings hierarchy in the Media Views for better accessibility.

Fixes #34273.
Built from https://develop.svn.wordpress.org/trunk@35427


git-svn-id: http://core.svn.wordpress.org/trunk@35391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia
2015-10-28 23:08:24 +00:00
parent d7da5970fa
commit db8b09c40d
11 changed files with 77 additions and 48 deletions

View File

@@ -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 @@
right: 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 {

File diff suppressed because one or more lines are too long

View File

@@ -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 {

File diff suppressed because one or more lines are too long

View File

@@ -171,7 +171,7 @@ function wp_print_media_templates() {
<script type="text/html" id="tmpl-uploader-window">
<div class="uploader-window-content">
<h3><?php _e( 'Drop files to upload' ); ?></h3>
<h1><?php _e( 'Drop files to upload' ); ?></h1>
</div>
</script>
@@ -188,19 +188,19 @@ function wp_print_media_templates() {
<# } #>
<div class="uploader-inline-content {{ messageClass }}">
<# if ( data.message ) { #>
<h3 class="upload-message">{{ data.message }}</h3>
<h2 class="upload-message">{{ data.message }}</h2>
<# } #>
<?php if ( ! _device_can_upload() ) : ?>
<h3 class="upload-instructions"><?php printf( __('The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.'), 'https://apps.wordpress.org/' ); ?></h3>
<?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?>
<h3 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h3>
<h2 class="upload-instructions"><?php printf( __( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.' ), 'https://apps.wordpress.org/' ); ?></h2>
<?php if ( is_multisite() && ! is_upload_space_available() ) : ?>
<h2 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h2>
<?php
/** This action is documented in wp-admin/includes/media.php */
do_action( 'upload_ui_over_quota' ); ?>
<?php else : ?>
<div class="upload-ui">
<h3 class="upload-instructions drop-instructions"><?php _e( 'Drop files anywhere to upload' ); ?></h3>
<h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files anywhere to upload' ); ?></h2>
<p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
<button type="button" class="browser button button-hero"><?php _e( 'Select Files' ); ?></button>
</div>
@@ -257,7 +257,7 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-uploader-status">
<h3><?php _e( 'Uploading' ); ?></h3>
<h2><?php _e( 'Uploading' ); ?></h2>
<button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text"><?php _e( 'Dismiss Errors' ); ?></span></button>
<div class="media-progress-bar"><div></div></div>
@@ -490,14 +490,13 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-attachment-details">
<h3>
<?php _e('Attachment Details'); ?>
<h2>
<?php _e( 'Attachment Details' ); ?>
<span class="settings-save-status">
<span class="spinner"></span>
<span class="saved"><?php esc_html_e('Saved.'); ?></span>
</span>
</h3>
</h2>
<div class="attachment-info">
<div class="thumbnail thumbnail-{{ data.type }}">
<# if ( data.uploading ) { #>
@@ -599,7 +598,7 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-attachment-display-settings">
<h3><?php _e('Attachment Display Settings'); ?></h3>
<h2><?php _e( 'Attachment Display Settings' ); ?></h2>
<# if ( 'image' === data.type ) { #>
<label class="setting">
@@ -706,7 +705,7 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-gallery-settings">
<h3><?php _e('Gallery Settings'); ?></h3>
<h2><?php _e( 'Gallery Settings' ); ?></h2>
<label class="setting">
<span><?php _e('Link To'); ?></span>
@@ -776,7 +775,7 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-playlist-settings">
<h3><?php _e( 'Playlist Settings' ); ?></h3>
<h2><?php _e( 'Playlist Settings' ); ?></h2>
<# var emptyModel = _.isEmpty( data.model ),
isVideo = 'video' === data.controller.get('library').props.get('type'); #>
@@ -903,7 +902,7 @@ function wp_print_media_templates() {
<input type="text" data-setting="alt" value="{{ data.model.alt }}" />
</label>
<h3><?php _e( 'Display Settings' ); ?></h3>
<h2><?php _e( 'Display Settings' ); ?></h2>
<div class="setting align">
<span><?php _e('Align'); ?></span>
<div class="button-group button-large" data-setting="align">
@@ -985,7 +984,7 @@ function wp_print_media_templates() {
<input type="text" class="link-to-custom" data-setting="linkUrl" />
</div>
<div class="advanced-section">
<h3><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h3>
<h2><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h2>
<div class="advanced-settings hidden">
<div class="advanced-image">
<label class="setting title-text">

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35426';
$wp_version = '4.4-beta2-35427';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.