[wp-trac] [WordPress Trac] #50066: Make alt text input a textarea on classic editor

WordPress Trac noreply at wordpress.org
Sun May 3 10:20:04 UTC 2020


#50066: Make alt text input a textarea on classic editor
-------------------------------+-----------------------------
 Reporter:  edent              |      Owner:  (none)
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Editor             |    Version:
 Severity:  normal             |   Keywords:
  Focuses:  ui, accessibility  |
-------------------------------+-----------------------------
 The alt text interface is a single line which only shows a few characters
 of text.

 If we want people to add meaningful `alt` text, this should be improved.

 I suggest making it a `textarea` element.

 This is already the case in the Gutenberg editor - see
 https://github.com/WordPress/gutenberg/pull/6119

 The code is in /src/wp-includes/media-template.php  :

 {{{#!php
 <span class="setting has-description" data-setting="alt">
         <label for="attachment-details-alt-text" class="name"><?php _e(
 'Alt Text' ); ?></label>
         <input type="text" id="attachment-details-alt-text" value="{{
 data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }}
 />
 </span>
 }}}

 That `input type="text"` can be changed to a `<textarea>` element.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50066>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list