RE: HTML techniques - Embedded objects (no blocker)

Thanks for raising this Yvette. Among others, this relates to Issue
#314[1] on our issues list, but there are a number of issues here that
need to be considered carefully. There are a few places where we've run
into similar issues in the techniques work and <object> and <embed> are a
great examples of places where validity and practicality are at odds with
each other.

At the 8/14 techniques telecon, I took an action item to look into UA
support for various uses of the <object> tag. Here are some of the code
examples I've looked at so far, the results in various browsers and
assistive technologies and some issues and questions I've encountered
along the way.

Note that the examples and issues that follow are not a comprehensive
test of all user-agent and assistive technology combinations related to
object and embed, just an overview of some of the behaviors noted in a
few of the more commonly-available user agents when trying to embed
multimedia using valid markup.

[begin code sample 1]

<object type="audio/x-wav" standby="Loading Audio" data="example.wav">
<param name="src" value="example.wav" valuetype="data"></param>
<param name="autostart" value="false" valuetype="data"></param>
<param name="controls" value="ControlPanel" valuetype="data"></param>
<a href="example.wav">Example Audio File</a>
</object>

[end code sample 1]

While this example passes the W3C validity tests, it seems that few User
agents (used with or without AT) support this element correctly.

   1. In JAWS 4.02 and 4.5/IE6 and WindowEyes 4.2/IE6, the alternative
      information presented inside the object tag is presented
      differently based on the type of file:
         a. with a .wav file, IE presents an embedded version of windows
            media player that is completely ignored by the screenreader.
            This tends to be the case with most embedded media players.
            (see summary from WebAIM[2])
         b. with an .svg file (regardless of the presence of the SVG
            plug-in), alternate content inside the object tag was
            rendered both visually and auditorally.
         c. Where object is used to embed an applet (ex. <object
            classid="myclass2.class"><em>Alternative
            content.</em></object>), alternative content inside the
            object tag was not rendered.
   2. In WindowEyes 4.5 Beta 2:
         a. with a .wav file (on this machine, an embedded RealPlayer is
            displayed) both the alternative content is read and the
            controls for the embedded media player are available so that
            the sound file can be played, paused, etc.
         b. for .svg, the content of the object tag is displayed before
            the SVG image.
         c. Where object is used to embed an applet, the alternative
            content is rendered correctly.
   3. In Opera 7.11 and Mozilla 1.5a, the link to the example audio file
      was rendered in place of the embedded object.
   4. Home Page Reader 3.0 reads the alternative content and makes the
      user aware that the object tag exists (reads "Object: Example o
      File") but does not provide a mechanism for the user to follow the
      link.

The <object> element and the title attribute:

[begin code sample 2]

<object classid="myclass.class" title="This is an object"></object>

[end code sample 2]

   1. Home Page Reader 3.0 reads the contents of the title attribute on
      an object in the same manner that it reads alternative content
      within the object element itself.
   2. WindowEyes 4.2 and 4.5 Beta 2 did not read the title attribute on
      <object>
   3. JAWS 4.5 read the title attribute followed by the word "button."

[begin code example 3]

<object data="illustration.svg" codetype="image/svg-xml" width="100%"
height="100%">
<p>Alternate Content</p> </object>

[end code example 3]

This example was an attempt to embed an SVG illustration according to
spec. While valid, IE 6 ignored interactivity in the SVG when it was
included in this manner (interactivity worked fine if inside <embed>).

Additional user agent issues here include problems with recent versions
of Netscape (though the fallback above works in Netscape 4.7), Mozilla
and some Mac browsers rendering SVG or compatibility with the SVG plug-in
from Adobe.

Issues:

   1. There does not seem to be a cross-browser, AT-friendly,
      standards-compliant, accessible technique available for embedding
      multimedia objects. While there are workarounds that would allow
      authors to ensure more reliable browser compatibility, embedding
      multimedia (at least as our guidelines are currently worded) will
      require that authors document specification violations necessary
      for backward compatibility under guideline 4.3.
   2. At this point in time, it's not clear to what extent we
      should be promoting techniques that are not covered in W3C
      specifications or what directions various user agents and assistive
      technology vendors may be headed in terms of support for embedded
      multimedia. It may be helpful to discuss this issue further with
      the User Agent and HTML working groups and perhaps others in W3C.
   3. Techniques from WCAG 1.0 related to the use of object[3] are not
      well supported in current user agents or AT.

Without a reliable mechanism or presenting alternative content given
current browser support, it might make sense to provide techniques that
suggest presentation of alternate content in parallel with multimedia. 
In the meantime, techniques could be somewhat similar to what was done in
WCAG 1.0 with d-link where, for example, a link to a description of an
SVG file or a link to a downloadable copy and transcript of an audio
file, etc. would be provided alongside (rather than inside of) the
embedded content.

Thoughts/Comments/Suggestions?

-Ben

Additional resources:

Jeffery Zeldman's book, "Designing for Web Standards," (pp. 291-296)
includes an excellent summary of the issues surround browser support for
object and embed elements. 

flash satay - embedding flash while supporting standards[4]
describes a standards-compliant technique for using <object> to embed
flash content from A list apart.

Object Support in Browsers[5] - A description of <object> support for
user agents including 4.0 versions of IE and Netscape.

The UAAG 1.0 Test Suite draft[6] addresses use of object and embed in a
number of places. Examples available thus far include rendering
conditional content for object and toggling presentation of both object
and embed.

MSDN information related to embedding SVG[7] 

--------------------------------------------------------------
References

[1] <http://trace.wisc.edu/bugzilla_wcag/show_bug.cgi?id=314>
[2] <http://www.webaim.org/articles/embeddedmp.php>
[3] <http://www.w3.org/TR/WCAG10-HTML-TECHS/#objects>
[4] <http://www.alistapart.com/stories/flashsatay/>
[5] <http://www.student.oulu.fi/~sairwas/html40support/object/>
[6] <http://www.w3.org/WAI/UA/TS/html401/>
[7]
<http://msdn.microsoft.com/msdnmag/issues/03/07/ScalableVectorGraphics/defau
lt.aspx>

--
Ben Caldwell | caldwell@trace.wisc.edu
Trace Research and Development Center (http://trace.wisc.edu)   


-----Original Message-----
From: w3c-wai-gl-request@w3.org [mailto:w3c-wai-gl-request@w3.org] On Behalf
Of Yvette P. Hoitink
Sent: Friday, October 31, 2003 10:17 AM
To: w3c-wai-gl@w3.org
Subject: HTML techniques - Embedded objects (no blocker)


In the HTML techniques document, there is two techniques for the Embed
element,  called "Alt content for embed":
<http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-HTML-TECHS-20031020.html#noembed>
and Alt text for embed.

However, EMBED is no longer supported in HTML4+. I do not think we should
give techniques for elements that are no longer in the HTML specification.
If we do want to include techniques for obsolete elements for backwards
compatibility purposes, this should be made explicit with each technique
that uses them.

In the next section below, called "Embedding multimedia objects", it does
mention that you should use EMBED within OBJECT for backward compatibility,
however it does not say that EMBED is no longer part of the specification
and will lead to invalid documents. If I were a casual visitor, I would
think that OBJECT is the preferred way, but also that EMBED is still allowed
which is not the case.

Also, I think we should include some more examples of how to embed a movie
or sound fragment (for example an AVI or WAV file). I am currently building
a website with some movies and sounds, but have had a very hard time finding
out how to make this accessible and cross-browser. My added problem was that
we create these pages on the fly (server-side), without knowing the actual
width and height of the movies. 

The current example for movies are Flash-only, where there normally is one
designated plugin. This is contrary to other movies which can use different
programs to be played, depending on the user's preferences, operating
system, browser, etc.

Yvette Hoitink
CEO Heritas, Enschede, The Netherlands

Received on Friday, 31 October 2003 12:38:25 UTC