[wp-trac] [WordPress Trac] #36735: Add media, insert from URL and alt attribute
WordPress Trac
noreply at wordpress.org
Fri Jul 15 03:15:24 UTC 2016
#36735: Add media, insert from URL and alt attribute
--------------------------------------+----------------------------
Reporter: afercia | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.6
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch | Focuses: accessibility
--------------------------------------+----------------------------
Changes (by joemcgill):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"38065"]:
{{{
#!CommitTicketReference repository="" revision="38065"
Media: Always add `alt` attributes to images inserted from URLs
Previously, when inserting an image from a URL, leaving the `alt`
field blank in the media modal would result in an image being
inserted into the editor without an `alt` attribute, rather than
an empty `alt`. This happened because the `props.type` would not
get set in `wp.media.string.props()` — because `attachment` is
undefined in this case — causing the image fallbacks to get
skipped.
This fixes the issue by explicitly setting `props.type` to 'image'
in `wp.media.string.image()` before filling out the rest of the
properties.
Props ambrosey, dabnpits.
Fixes #36735.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36735#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list