extending CSS is unnecessary Re: Abbreviations and Acronyms: [techs] Latest HTML Techniques Draft
Charles McCathieNevile <[email protected]> Fri, 12 Dec 2003 04:35:57 -0500 (EST)
| Newsgroups | gmane.comp.web.html.general,gmane.org.w3c.accessibility.guidelines |
|---|---|
| Message-ID | <[email protected]> |
Actually you can do this already, using XHTML 1.1 and CSS 2, as the
following example shows:
some XHTML:
=2E..
<ruby class=3D"acron">
<rb>NATO</rb><rt>North Atlantic Treaty Organisation</rt></ruby>'s
strategy for the
<ruby class=3D"init"><rb>UN</rb><rt>United Nations</rt></ruby>
was yesterday spelled out by
<ruby class=3D"abbr"><rb>Dr</rb><rt>Doctor</rt></ruby>
Strangelove...
with the following style:
@media screen {
ruby.init rb, ruby.abbr rt, ruby.acron rt { display: none }
}
@media aural {
ruby.init rt, ruby.abbr rb, ruby.acron rt { speak: none }
ruby.abbr rt, ruby.acron rb { speak: normal }
ruby.init rb { speak: spell }
}
which will present on screen:
NATO's strategy for the United Nations was yesterday spelled out by Dr
Strangelove
and will read in audio:
"Nato's strategy for the U N was yesterday spelled out by Doctor Strangelov=
e"
Seems too easy - three classes to cover the required variations, the
information is there to allow people to give a different version, it's all
element content, ...
cheers
Chaals
On Thu, 11 Dec 2003, Christoph P=E4per wrote:
> <link rel=3D"stylesheet abbr" href=3D"/abbreviations.css" type=3D"text/c=
ss"
>media=3D"aural"/>
> ...
> <p xml:lang=3D"en"><abbr>e.g.</abbr>, <abbr>abbr.</abbr>,
> <acronym>WWW</acronym>, <acronym>NATO</acronym>.</p>
>
> /* /abbreviations.css */
> abbr("abbr."):lang(en) {content: "abbreviation";}
> abbr("WWW"):lang(en) {content: "World Wide Web"}
> abbr("WWW"):lang(de) {content: "W W W";}
> abbr("NATO") {content: "Nato";}
>
>Quite similar a glossary might work:
>
> <link rel=3D"glossary" href=3D"/glossary"/>
> ...
> <term>foo</term>
>
> ; /glossary.txt
> foo: A generic placeholder.
>
> <!-- /glossary.html -->
> ...
> <dl><dt id=3D"foo">foo</dt><dd>A generic placeholder.</dd></dl>