Difference between revisions of "User:Eoconnor/ISSUE-203"

From HTML WG Wiki
Jump to: navigation, search
m (formatting)
m (tweak wording)
Line 55: Line 55:
 
=== Arguments against alt="" ===
 
=== Arguments against alt="" ===
  
In [[ChangeProposal/Issue203|the other ISSUE-203 Change Proposal]] (apparantly simply titled "Change Proposal," hereafter "John's proposal" for disambiguation), the <code>&lt;img></code> element's <code>alt=""</code> attribute is repurposed for  <code>&lt;audio></code> and <code>&lt;video></code>. The justification provided for the propagation of <code>alt=""</code> onto elements other than <code>&lt;img></code> is that it is "seemingly obvious and rational."
+
In [[ChangeProposal/Issue203|the other ISSUE-203 Change Proposal]], the <code>&lt;img></code> element's <code>alt=""</code> attribute is repurposed for  <code>&lt;audio></code> and <code>&lt;video></code>. The justification provided for the propagation of <code>alt=""</code> onto elements other than <code>&lt;img></code> is that it is "seemingly obvious and rational."
  
 
However, the fact that <code>&lt;img></code>'s short description is housed in an attribute value is widely considered to be an unfortunate part of the platform—because text in attribute values cannot be marked up, styled, or tagged with language and directionality metadata. This is why, under our proposal, authors may use <code>aria-labelledby=""</code> to provide a short description. Thus, it is possible to mark up and style the description, or tag it with language and directionality metadata. We should not spread <code>alt=""</code>'s design flaws out any farther than required for Web compatibility.
 
However, the fact that <code>&lt;img></code>'s short description is housed in an attribute value is widely considered to be an unfortunate part of the platform—because text in attribute values cannot be marked up, styled, or tagged with language and directionality metadata. This is why, under our proposal, authors may use <code>aria-labelledby=""</code> to provide a short description. Thus, it is possible to mark up and style the description, or tag it with language and directionality metadata. We should not spread <code>alt=""</code>'s design flaws out any farther than required for Web compatibility.

Revision as of 17:27, 6 July 2012


Use WAI-ARIA for short and long descriptions of media elements

This is for ISSUE-203 (media-descriptions).

Rationale

WCAG 2 requires that authors "Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language."

Existing WAI-ARIA attributes may be used to provide both short and long descriptions of HTML's media elements. For instance:

<video controls
       aria-label="My Vacation Movie"
       aria-describedby="#foo">
  <source src="vacation_movie.mp4" type="video/mp4">
  <source src="vacation_movie.webm" type="video/webm">
  <track src="vacation_captions_file.vtt" label="English captions" kind="captions">
</video>
<p id=foo>A longer textual description which relates to the Media asset

or

<video controls
       aria-labelledby="#bar"
       aria-describedby="#foo">
  <source src="vacation_movie.mp4" type="video/mp4">
  <source src="vacation_movie.webm" type="video/webm">
  <track src="vacation_captions_file.vtt" label="English captions" kind="captions">
</video>
<div id=foo>
<h1 id=bar>My Vacation Movie</h1>
<p>A longer textual description which relates to the Media asset
</div>

If design considerations require the longer text description to not be visible on screen by default, it could be hidden="" (pending resolution of ISSUE-204), or the long description could be placed in the rich media fallback like so:

<video controls
       aria-label="My Vacation Movie"
       aria-describedby="#foo">
  <source src="vacation_movie.mp4" type="video/mp4">
  <source src="vacation_movie.webm" type="video/webm">
  <track src="vacation_captions_file.vtt" label="English captions" kind="captions">
<p id=foo>A longer textual description which relates to the Media asset
</video>

As detailed in Allow ARIA Attributes to Reference Hidden Elements, browser implementors have indicated that referring to hidden content (whether explicitly hidden with hidden="" or implicitly by placement inside the media element's fallback) in this manner is not problematic.

No separate provision for describing <video poster> is defined in this proposal, as this Working Group resolved to not provide alternative text for <video poster> in ISSUE-142.

Arguments against alt=""

In the other ISSUE-203 Change Proposal, the <img> element's alt="" attribute is repurposed for <audio> and <video>. The justification provided for the propagation of alt="" onto elements other than <img> is that it is "seemingly obvious and rational."

However, the fact that <img>'s short description is housed in an attribute value is widely considered to be an unfortunate part of the platform—because text in attribute values cannot be marked up, styled, or tagged with language and directionality metadata. This is why, under our proposal, authors may use aria-labelledby="" to provide a short description. Thus, it is possible to mark up and style the description, or tag it with language and directionality metadata. We should not spread alt=""'s design flaws out any farther than required for Web compatibility.

Arguments against longdesc=""

Whether or not HTML should include longdesc="" at all is covered by ISSUE-30. As covered in a February 2010 zero-edit Change Proposal for ISSUE-30, several studies were performed. They demonstrated:

  • The longdesc="" attribute is extremely rarely used (on the order of 0.1% in one study). [The longdesc lottery]
  • When used, longdesc="" is extremely rarely used correctly (over 99% were incorrect in a study that only caught the most obvious errors [The longdesc lottery]; the correct values were below the threshold of statistical significance on another study that examined each longdesc="" by hand [Longdesc usage]).
  • Most users (more than 90%) don't want the interaction model that longdesc="" implies. [WebAIM Screen Reader User Survey #2 Results]
  • Users that try to use longdesc="" find it doesn't work ("Who uses this kind of thing? In my experience [...] it just didn't work. There was no description.") [NCBI Centre for Inclusive Technology].

Furthermore, there already exist a number of alternative mechanisms for providing information to users without using longdesc="", such as simply including the information inline, providing explicit links to long descriptions, and using ARIA attributes such as aria-describedby="".

Including the longdesc="" attribute in the language therefore seems like a poor design decision.

Details

No change.

Impact

Positive Effects

  • Authors will be able to mark up and style both short and long descriptive text for media elements, and to provide language and directionality metadata for it.

Negative Effects

  • Authors might not already be familiar with the use of WAI-ARIA attributes.

Conformance Classes Changes

None.

Risks

None.


Local Variables: mode: text mode: longlines End: