Closed (fixed)
Project:
YouTube Field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2013 at 14:49 UTC
Updated:
4 Mar 2015 at 23:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nickgrace commentedComment #2
guschilds commentedThe video title is not saved in the database and therefore must be fetched from youtube to be used (see #1916756: Provide function or ability to display YouTube video's title). You could use the code in #1's patch while overriding
theme_youtube()if you'd like, but I don't think it will end up in the module.Regardless, the iframe's title attribute should at least be given a generic value, such as
t("Embedded YouTube video content"). Thoughts?Comment #3
pagaille commentedAny title would be better than no title, but the actual title would be best of all.
Comment #4
guschilds commentedAttached is a patch that assigns the YouTube video's title as the title attribute of the embedded iframe. There is an option to disable this and instead provide a default value of "Embedded YouTube video player" (admin/config/media/youtube). The option exists to not require that the extra request via
file_get_contents()is made.To test, please:
Comment #5
guschilds commentedSee #6.
Comment #6
guschilds commentedAttached is a fixed patch that ensures the YouTube video's data was successfully retrieved before grabbing the title.
Comment #7
guschilds commentedBumping this back up so it gets addressed. The video iframe should have a title. The title probably shouldn't come from the actual YouTube video, as the above patches implement, because it would rely on an external call to YouTube for every video load (unless caching was introduced). However, as #3 mentions, any title is better than no title. Perhaps it should be something like
title="YouTube video for [node:title]"or more generic,title="Embedded YouTube video".This is needed for 8.x-1.x and 7.x-1.x.
http://www.w3.org/TR/WCAG20-TECHS/H64.html
Comment #10
guschilds commentedA title tag has finally been added to the iframe element in both the 7.x-1.x and 8.x-1.x branches. The title goes by the format "Embedded video for [entity:title]". See the previous discussion for more information. Thanks to everyone involved.