When the embedded object is replaced with an <iframe> in media_youtube.js, it does not add a 'title' and a 'name' attribute to the <iframe>, due to which the drupal page having these YT videos fails the 508-compliance check. Ideally, the <iframe> should generate 'title' and 'name' attributes and they should be set as the title of of the video.

Thanks,
Sumit

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sumitgupta2004’s picture

Title: Youtube iframe missing alt and title attributes » YouTube <iframe> tag missing alt and title attributes
sumitgupta2004’s picture

Title: YouTube <iframe> tag missing alt and title attributes » YouTube iframe tag missing alt and title attributes
sumitgupta2004’s picture

Category: Feature request » Bug report
mgifford’s picture

Version: 7.x-1.0-beta3 » 7.x-2.x-dev
Issue tags: +Accessibility
Related issues: +#2051013: Missing ability to configure alt and title for image of video thumbnail
stefan.r’s picture

Title: YouTube iframe tag missing alt and title attributes » YouTube iframe tag missing name and title attributes
Issue summary: View changes

Iframes don't support the "alt" attribute, but they should still have a "name" attribute for accessibility reasons.

stefan.r’s picture

Issue summary: View changes
stefan.r’s picture

Issue summary: View changes
stefan.r’s picture

Status: Active » Needs review
FileSize
1.49 KB

Attached is a patch which gets the file object from the database (and thus gets the correct video title, instead of just the video ID, which is meaningless as far as accessibility is concerned).

It also adds the "name" attribute (which will be equal to the video title and the "title" attribute).

I think the issue summary is outdated as there is no media_youtube.js in 2.x or any Iframe being created in javascript. There is also already a "title" attribute, it's just the "name" attribute that's missing.

stefan.r’s picture

Can anyone please review this? Thanks!

stefan.r’s picture

Status: Needs review » Fixed

stefan.r’s picture

Status: Fixed » Needs review
bneil’s picture

Title: YouTube iframe tag missing name and title attributes » YouTube iframe tag missing name attribute

Testing the latest dev, the title attribute is already provided on the iFrame.

stefan.r’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
FileSize
1.49 KB

Re-roll against 3.x

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks stefan.r!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.