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

WordPress Trac noreply at wordpress.org
Wed Jun 17 08:46:06 UTC 2020


#50066: Make alt text input a textarea on classic editor
-------------------------------------+--------------------------------
 Reporter:  edent                    |       Owner:  sabernhardt
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.5
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, accessibility
-------------------------------------+--------------------------------

Comment (by sabernhardt):

 [attachment:50066.2.diff] expands on 50066.edit-media.diff, but I have not
 addressed the input sanitization.

 Updates:

 1. HTML: I added the `alt-text` class to the two `span` tags with `data-
 setting="alt"`, to be more consistent with the other two alt-text spans'
 classes.
    `<span class="setting alt-text has-description" data-setting="alt">`

 2. CSS (modals): The Caption height is 62 pixels, and 52 pixels is the
 smallest the Alt Text box can be while showing two full lines without the
 scrollbar. (13px font with 1.42857143 line-height, plus 6px top and bottom
 padding, plus 1px border)

 3. CSS (media edit screen): The Caption height is 4em, so the Alt Text
 field is noticeably shorter at 2.5em but slightly taller than the input
 was. To keep the cursor centered vertically, I changed the line-height to
 2. The vertical alignment seems to work with zoom, but not as well with
 minimum font size.

 4. QUnit: Without checking for other discrepancies, I only updated the alt
 text spans. All four now have the labels and textareas inside the span,
 and the same `alt-text` class.

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


More information about the wp-trac mailing list