Joe McGill
8ed022b568
Media: Remove alt fallbacks to improve accessibility.
...
This removes the fallbacks in `wp_get_attachment_image()` and in
`wp.media.string.props` which attempt to generate an `alt` value
from the image caption or title if an `alt` attribute isn't explicitly
set.
This allows for image HTML to be generated that contains an empty `alt`
value, i.e., `alt=""` which is much preferable for screen readers than
reading redundant content in the case of a caption, or when reading the
image title, which is often generated from the filename and not helpful
as `alt` text.
Props odie2, joedolson, rianrietveld, afercia, iamjolly, joemcgill.
Fixes #34635 .
Built from https://develop.svn.wordpress.org/trunk@38812
git-svn-id: http://core.svn.wordpress.org/trunk@38755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:06:28 +00:00
..
2012-12-20 15:55:32 +00:00
2015-07-20 15:57:25 +00:00
2013-09-21 12:46:09 +00:00
2016-08-18 18:55:30 +00:00
2016-07-18 10:59:30 +00:00
2016-06-16 16:15:31 +00:00
2016-09-03 15:02:36 +00:00
2016-05-23 10:30:29 +00:00
2016-10-14 21:38:28 +00:00
2015-07-20 20:02:24 +00:00
2016-04-15 16:10:37 +00:00
2016-06-17 03:02:29 +00:00
2016-06-17 03:02:29 +00:00
2016-06-16 09:27:29 +00:00
2012-11-17 15:11:29 +00:00
2016-04-15 16:10:37 +00:00
2015-11-18 19:15:28 +00:00
2015-11-18 19:15:28 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2015-07-19 17:09:26 +00:00
2016-04-15 16:10:37 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-10-19 02:06:30 +00:00
2016-10-19 02:06:30 +00:00
2016-10-18 20:05:31 +00:00
2016-10-18 20:05:31 +00:00
2016-02-23 17:27:26 +00:00
2016-02-23 17:27:26 +00:00
2016-02-25 12:53:27 +00:00
2015-07-28 22:07:25 +00:00
2015-03-11 17:15:27 +00:00
2015-03-11 17:15:27 +00:00
2016-06-28 18:48:31 +00:00
2015-10-06 14:02:25 +00:00
2015-10-06 14:02:25 +00:00
2016-06-28 18:48:31 +00:00
2016-10-11 00:56:29 +00:00
2016-10-11 00:56:29 +00:00
2016-02-17 15:22:26 +00:00
2016-02-17 15:22:26 +00:00
2016-10-19 03:06:28 +00:00
2016-10-19 03:06:28 +00:00
2016-06-16 04:54:29 +00:00
2016-06-16 04:54:29 +00:00
2015-07-20 23:39:24 +00:00
2016-04-15 16:10:37 +00:00
2016-10-14 21:33:28 +00:00
2016-10-14 21:33:28 +00:00
2016-06-09 00:25:27 +00:00
2016-06-09 00:25:27 +00:00
2016-07-20 14:38:29 +00:00
2016-07-20 14:38:29 +00:00
2012-04-17 23:09:29 +00:00
2012-08-23 00:04:18 +00:00
2015-06-28 14:51:30 +00:00
2016-10-04 03:24:30 +00:00
2016-10-04 03:24:30 +00:00
2016-02-17 15:22:26 +00:00
2015-09-08 16:44:26 +00:00
2015-09-08 16:44:26 +00:00
2016-07-20 14:26:28 +00:00
2016-07-20 14:26:28 +00:00
2016-01-13 16:17:27 +00:00
2016-04-15 16:10:37 +00:00
2016-01-13 17:22:27 +00:00
2016-01-13 17:22:27 +00:00
2016-01-15 04:02:28 +00:00
2016-01-15 04:02:28 +00:00
2016-07-05 16:16:57 +00:00
2016-07-05 16:16:57 +00:00
2016-02-25 10:23:27 +00:00
2016-02-25 10:23:27 +00:00
2016-10-04 03:24:30 +00:00
2016-10-04 03:24:30 +00:00
2016-10-04 03:24:30 +00:00
2016-08-04 20:51:31 +00:00
2016-08-04 20:51:31 +00:00
2013-11-15 06:24:10 +00:00
2016-04-15 16:10:37 +00:00
2016-10-03 18:39:30 +00:00
2016-10-03 18:39:30 +00:00
2013-11-15 04:42:09 +00:00
2013-11-13 21:45:11 +00:00
2016-06-26 14:26:29 +00:00
2016-06-26 14:26:29 +00:00
2013-12-28 23:53:15 +00:00
2013-12-28 23:53:15 +00:00
2016-10-17 20:01:31 +00:00
2016-10-17 20:01:31 +00:00
2013-11-12 23:43:09 +00:00
2014-01-29 04:43:30 +00:00
2013-12-04 19:53:10 +00:00