- From: Sean B. Palmer <sean@mysterylights.com>
- Date: Tue, 18 Sep 2001 16:56:26 +0100
- To: <w3c-wai-gl@w3.org>
[+BCC to WAI PF, and W3C HTML Editor] Summary: this mail raises (well-known) accessibility errors with the "alt" attribute and "object" element, and suggests fixes. "Al Gilman" <mailto:asgilman@iamdigex.net> wrote:- > We are all in this together. We can only all be connected if we > use both words and pictures to connect. Leave out either, and > you have left out someone. Al has established here that it is an acccessibility principle that content of different modalities be used to "reinforce" the semantics of one another, in order to reach a varied an audience is possible. The XML Acccessibility Guidelines (XML GL), checkpoint 1.2 [1] introduces another idiom that is very much related to this, one of "flexible associations". I quote:- [[[ For example, HTML lets you add "alt" to images, but it does not let you add images to runs of text/markup, so people have to put up with less adequate mechanisms, perhaps by adding "see figure 1" at the end of a paragraph. ]]] XML GL raises this as an accessibility design error. Here, I want to suggest methods of overcoming this. AFAICT, the alternatives to using "alt" are:- * Use <object> * Wait for XHTML 2.0, where this problem will be fixed In fact, <object> as-is is not an adequate flexible association mechanism, because it cannot be explicitly linked to an alternative for the media object, i.e. one that is external to the <object> element, rather than appearing inside it. Also, <object> suffers from the "choice, not echo" problem, in that nested objects *cascade* according to the HTML 4.01 specification:- [[[ If a user agent cannot render the outermost OBJECT, it tries to render the contents, which may be another OBJECT element, etc. ]]] - http://www.w3.org/TR/html401/struct/objects#edef-OBJECT rather than being a pallette of choices, with some mark of indication that there is an author preferred order. I got to wondering how minor modifications/hacks could be made to HTML 4.01+ to overcome this problem. I've come up with two ideas that deserve to be recorded:- [[[ 1) Use <label>/<div> "label" is used to associate a run of markup with a form control, but could be extended to associate a run of markup with a media object, viz. any <img> or <object> elements that appear within it, or are linked to from the "for" attribute specified by the HTML 4.01 specification. The "div" element is also supposedly there to enbable us to group content together, but it doesn't let us detail the semantics of the assoiation, and it doesn't have a "for" attribute. 2) Use <a> The "a" element is a standard HyperText link. It could be used, possibly in conjenction with a "rel" attribute and profile to indicate that the enclosed markup (%inline;) is associated with the media object as an equivalent alternative. Annoyingly, the "alt" attribute will still be required on the <img> element even though there is a perfectly good alternative for it in the rest of the document somewhere. Example (in XHTML):- <p><img src="img.png" alt="some alt" id="a" /></p> <p><a rel="alt" href="#a">Some good alt, perhaps with extra images, inline phrasing, ruby, and so on. A disadvantage to this is that you cannot nest links.</a></p> All of which makes it a pointless hack. ]]] Neither of these solutions are ideal. The problem still remains that people have to resort to things like:- <p><img src="img.png" alt="some alt" id="a" /></p> <p><a href="#a">Diagram 1</a> shows xyz.</p> With no way of getting rid of the alt attribute, or of indicating that the alternative lies elsewhere. This is a serious accessibility error in HTML. Conclusion: I favor (although am not happy about) waiting for XHTML 2.0 to provide us with adequate equivalent/alterative mechanisms. Cheers, [1] http://www.w3.org/TR/2001/WD-xmlgl-20010829#cp1_2 -- Kindest Regards, Sean B. Palmer @prefix : <http://webns.net/roughterms/> . :Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Tuesday, 18 September 2001 11:57:46 UTC