[wp-trac] [WordPress Trac] #34635: WordPress image's title is not alt

WordPress Trac noreply at wordpress.org
Fri Oct 14 02:55:10 UTC 2016


#34635: WordPress image's title is not alt
-------------------------------------+-------------------------------------
 Reporter:  odie2                    |       Owner:  joemcgill
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Media                    |     Version:  4.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  ui, accessibility,
  tests                              |  javascript
-------------------------------------+-------------------------------------
Changes (by joemcgill):

 * keywords:  needs-patch early => has-patch has-unit-tests


Comment:

 After much discussion with the A11y team—particularly
 [https://wordpress.slack.com/archives/accessibility/p1473705362000503 this
 Slack conversation]—it appears we would be better off not trying to
 generate fallbacks for the `alt` attribute whenever an `alt` value has not
 been explicitly set. Currently, if no `alt` value is set, WordPress tries
 using the caption text before finally falling back to the title. While the
 intent of these fallbacks is good, in practice they often result in
 undesirable behavior for people using screen readers.

 [attachment:34635.diff] removes the fallbacks so that an `alt` value will
 always reflect the value of `_wp_attachment_image_alt` post meta for that
 attachment (unless overridden by some other method). I've also added or
 updated unit tests to reflect this change, but am not certain if some
 QUnit tests for the editor might be needed. Would appreciate feedback from
 @iseulde or @azaozz there.

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


More information about the wp-trac mailing list