Below is the text of a Change Proposal that I've chosen not to submit. - [[User:Eoconnor|Edward O&#39;Connor]]

+

'''Below is the text of a Change Proposal that I've chosen not to submit.''' - [[User:Eoconnor|Edward O&#39;Connor]]

= Reuse the rel and for attributes to programmatically associate transcripts with media elements =

= Reuse the rel and for attributes to programmatically associate transcripts with media elements =

Latest revision as of 00:01, 30 May 2012

Below is the text of a Change Proposal that I've chosen not to submit. - Edward O'Connor

Reuse the rel and for attributes to programmatically associate transcripts with media elements

In order to programmatically associate media elements with transcripts, we should use a combination of the for="" and rel="" attributes on visible <a> and <area> elements to associate the transcript link with the media element.

Rationale

Given the various possible designs of a method for programmatically associating transcripts with media elements, design 3B satisfies more of our criteria than the other designs.

The transcript is programattically associated with the media element.

It's easy for UAs to find all of the media element's transcripts. It's easy to update existing content to use this markup pattern.

We avoid duplicating the link to the transcript.

You can link to many transcripts, and you can use the existing hreflang="" attribute to hint to the UA about the language that each transcript is in.

It's possible to link to same-document transcripts as well as external resources.

It degrades well in UAs that don't support the <video> or <audio> elements, as well as in UAs that support <video> and <audio>, but have not yet been updated to support programmatically associated transcripts.

It's reasonably easy to author.

By changing the rel="" value, we can reuse this design in the future for linking to other, non-transcript descriptions of media elements.

Details

N.B. The spec changes described below are intended to fully describe the sorts of changes necessary, but the exact form of the changes to be made are left to the editor. (This is not a diff that can be blindly applied to the specification.)

Definition of the transcript rel value

In the link type summary table in #linkTypes, add an entry to the table with the following values:

Link type

transcript

Effect on link

not allowed

Effect on a and area

Hyperlink

Brief description

Indicates that the referenced document is a transcript for a media element elsewhere in the current document, referenced by this element's for="" attribute.

Add a new section "Link type "transcript"".

The transcript keyword may be used with a and area elements.

For a and area elements, the transcript keyword indicates that the referenced document is a transcript of the media element referenced in the a or area element's for="" attribute.

If the a or area element does not have a for="" attribute, or if the value of the for="" attribute is not the ID of a media element in the same Document as the a element, then this link type has no meaning.

Modifications to the-a-element and the-area-element

Add a for="" attribute to the list of attributes taken by <a> and <area> elements. The IDL attribute for must reflect the for="" content attribute. Add text defining the for="" attribute, along the lines of the text below:

The for="" attribute may be used to indicate that the referenced document describes the element whose ID is the value of the for="" attribute. The rel="" attribute is used to indicate the sort of description available. For instance, this mechanism may be used to associate transcripts with media elements by using rel=transcript.

Modifications to the-video-element and the-audio-element

In #the-video-element, update the note beginning with the sentence "In particular, this content is not intended to address accessibility concerns". Specifically, change the sentence

For users who would rather not use a media element at all, transcripts or other textual alternatives can be provided by simply linking to them in the prose near the video element.

to reference this new mechanism, like so or with the equivalent text:

For users who would rather not use a media element at all, transcripts or other textual alternatives can be provided by simply linking to them in the prose near the video element, and associating the link with the video element as described in [link to section on transcripts].

Make a similar edit to the same note in #the-audio-element.

Media elements

Add to the HTMLMediaElement interface a readonly attribute transcripts.

readonly attribute HTMLCollection transcripts;

Describe it in the section Media elements like so (or with equivalent text):

The transcripts object represents a dynamically updating list of transcripts available for this media element.

This is a live collection of HTMLAnchorElements from this document whose rel attributes contain a transcript token and whose for="" attribute contains the ID of this media element.

(N.B. whether this should be a NodeList, an HTMLCollection, or some other object is left to the discretion of the editor.)

Add a new subsection of Media elements titled Transcripts. Include in this section text describing the transcripts attribute and the mechanism for associating transcript links with media elements.

Impact

Positive Effects

By programattically associating transcripts with media elements, we enable users, both assistive technology users and otherwise, to more easily access transcripts.

It's easy to update existing content to use this markup pattern, so it's easy for authors to adopt this technique.

We avoid duplicating the link to the transcript, thus preventing the link presented to AT users to fall out-of-sync with the link presented to others.

You can link to many transcripts, and you can use the existing hreflang="" attribute to hint to the UA about the language that each transcript is in.

It's possible to link to same-document transcripts as well as external resources.

It degrades well in UAs that don't support the <video> or <audio> elements, as well as in UAs that support <video> and <audio>, but have not yet been updated to support programmatically associated transcripts.

By changing the rel="" value, we can reuse this design in the future for linking to other, non-transcript descriptions of media elements.

Negative Effects

It's more difficult to programmatically associate a transcript link than it is to simply include the link in prose near a media element. Therefore it's reasonable to expect content authors to not bother with the programmatic association. (This is true for all methods of programmatically associating a transcript with a media element.)

Conformance Classes Changes

The for="" attribute is allowed on <a> and <area> elements, so long as its value is the ID of a media element in the same document.

Risks

UAs might not implement this mechanism, thus causing us to drop it from the specification in due course.