[wp-trac] [WordPress Trac] #40245: Youtube embeds lack title attribute

WordPress Trac noreply at wordpress.org
Wed Mar 13 20:38:55 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 swissspidy):

 I think `wp_filter_oembed_title_attribute` needs some adjustments to make
 sure it only targets iframes. Otherwise anyone filtering
 `oembed_title_attribute` would add title attributes to ''any'' element.

 Maybe using a regex like this:
 `<iframe[^>]*?title=["']([^"']*)["'][^>]*?>`

 I'm not a regex expert though :-)

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


More information about the wp-trac mailing list