[wp-trac] [WordPress Trac] #40245: Youtube embeds lack title attribute
WordPress Trac
noreply at wordpress.org
Thu Mar 14 20:43:06 UTC 2019
#40245: Youtube embeds lack title attribute
--------------------------------------+----------------------------
Reporter: morriscountynj | Owner: swissspidy
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.2
Component: Embeds | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: accessibility
--------------------------------------+----------------------------
Comment (by afercia):
@jrf thanks! I think @swissspidy has more context but I'll try to describe
what I see in the patch the best I can.
We need to add a title attribute with the video title to the HTML returned
from an oembed provider response. The patch already checks if the oembed
is a video.
After that, it uses the following regex to search for an existing title
attribute in the returned HTML:
`$pattern = '/title\=[\"|\\\']{1}([^\"\\\']*)[\"|\\\']{1}/i';`
that could match any title attribute in any element in the returned HTML.
Instead, we need to search for a match only within the `<iframe ...>` HTML
tag, if any.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40245#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list