Ticket #50066: 50066.2.diff
File 50066.2.diff, 8.7 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/media.css
805 805 margin-bottom: 5px; 806 806 } 807 807 808 .wp_attachment_details #attachment_alt { 809 height: 2.5em; 810 line-height: 2; 811 } 812 808 813 .wp_attachment_details .attachment-alt-text-description { 809 814 margin-top: 5px; 810 815 } -
src/wp-admin/includes/media.php
3185 3185 <?php if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) : ?> 3186 3186 <p class="attachment-alt-text"> 3187 3187 <label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br /> 3188 < input type="text" class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" aria-describedby="alt-text-description" value="<?php echo esc_attr( $alt_text ); ?>" />3188 <textarea class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" aria-describedby="alt-text-description"><?php echo esc_attr( $alt_text ); ?></textarea> 3189 3189 </p> 3190 3190 <p class="attachment-alt-text-description" id="alt-text-description"> 3191 3191 <?php -
src/wp-includes/css/media-views.css
507 507 resize: vertical; 508 508 } 509 509 510 .media-sidebar .setting.alt-text textarea, 511 .attachment-details .setting.alt-text textarea, 512 .compat-item .field.alt-text textarea, 513 .alt-text textarea { 514 height: 52px; 515 } 516 510 517 .compat-item { 511 518 float: left; 512 519 width: 100%; -
src/wp-includes/media-template.php
452 452 <div class="settings"> 453 453 <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> 454 454 <# if ( 'image' === data.type ) { #> 455 <span class="setting has-description" data-setting="alt">455 <span class="setting alt-text has-description" data-setting="alt"> 456 456 <label for="attachment-details-two-column-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> 457 < input type="text" id="attachment-details-two-column-alt-text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />457 <textarea id="attachment-details-two-column-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea> 458 458 </span> 459 459 <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> 460 460 <# } #> … … 653 653 </div> 654 654 <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> 655 655 <# if ( 'image' === data.type ) { #> 656 <span class="setting has-description" data-setting="alt">656 <span class="setting alt-text has-description" data-setting="alt"> 657 657 <label for="attachment-details-alt-text" class="name"><?php _e( 'Alt Text' ); ?></label> 658 < input type="text" id="attachment-details-alt-text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />658 <textarea id="attachment-details-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea> 659 659 </span> 660 660 <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> 661 661 <# } #> … … 957 957 958 958 <span class="setting alt-text has-description"> 959 959 <label for="embed-image-settings-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> 960 < input type="text" id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description" />960 <textarea id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description"></textarea> 961 961 </span> 962 962 <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> 963 963 … … 1020 1020 <div class="column-settings"> 1021 1021 <span class="setting alt-text has-description"> 1022 1022 <label for="image-details-alt-text" class="name"><?php _e( 'Alternative Text' ); ?></label> 1023 < input type="text" id="image-details-alt-text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" />1023 <textarea id="image-details-alt-text" data-setting="alt" aria-describedby="alt-text-description">{{ data.model.alt }}</textarea> 1024 1024 </span> 1025 1025 <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p> 1026 1026 -
tests/qunit/index.html
1161 1161 <div class="settings"> 1162 1162 <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> 1163 1163 <# if ( 'image' === data.type ) { #> 1164 < label class="setting" data-setting="alt">1165 < span class="name">Alternative Text</span>1166 < input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />1167 </ label>1164 <span class="setting alt-text has-description" data-setting="alt"> 1165 <label for="attachment-details-two-column-alt-text" class="name">Alternative Text</label> 1166 <textarea id="attachment-details-two-column-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea> 1167 </span> 1168 1168 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1169 1169 <# } #> 1170 1170 <label class="setting" data-setting="title"> … … 1326 1326 1327 1327 <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> 1328 1328 <# if ( 'image' === data.type ) { #> 1329 < label class="setting" data-setting="alt">1330 < span class="name">Alt Text</span>1331 < input type="text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />1332 </ label>1329 <span class="setting alt-text has-description" data-setting="alt"> 1330 <label for="attachment-details-alt-text" class="name">Alt Text</label> 1331 <textarea id="attachment-details-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea> 1332 </span> 1333 1333 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1334 1334 <# } #> 1335 1335 <label class="setting" data-setting="title"> … … 1618 1618 <img src="{{ data.model.url }}" draggable="false" alt="" /> 1619 1619 </div> 1620 1620 1621 < labelclass="setting alt-text has-description">1622 < span>Alternative Text</span>1623 < input type="text" data-setting="alt" aria-describedby="alt-text-description" />1624 </ label>1621 <span class="setting alt-text has-description"> 1622 <label for="embed-image-settings-alt-text" class="name">Alternative Text</label> 1623 <textarea id="embed-image-settings-alt-text" data-setting="alt" aria-describedby="alt-text-description"></textarea> 1624 </span> 1625 1625 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1626 1626 1627 1627 <label class="setting caption"> … … 1673 1673 </div> 1674 1674 </div> 1675 1675 <div class="column-settings"> 1676 < labelclass="setting alt-text has-description">1677 < span>Alternative Text</span>1678 < input type="text" data-setting="alt" value="{{ data.model.alt }}" aria-describedby="alt-text-description" />1679 </ label>1676 <span class="setting alt-text has-description"> 1677 <label for="image-details-alt-text" class="name">Alternative Text</label> 1678 <textarea id="image-details-alt-text" data-setting="alt" aria-describedby="alt-text-description">{{ data.model.alt }}</textarea> 1679 </span> 1680 1680 <p class="description" id="alt-text-description"><a href="https://www.w3.org/WAI/tutorials/images/decision-tree" target="_blank" rel="noopener noreferrer">Describe the purpose of the image<span class="screen-reader-text"> (opens in a new tab)</span></a>. Leave empty if the image is purely decorative.</p> 1681 1681 1682 1682 <label class="setting caption">