Steven Pemberton, CWI, Amsterdam and W3C
Chair, W3C HTML and Forms Working Groups
Editor in chief, ACM/interactions
Accessibility | ||||||
Internationalisation | ||||||
Device Independence | ||||||
Quality assurance | ||||||
Usability? | ||||||
X M L |
C S S |
H T M L |
. | . | . | e t c . |
The aims of XHTML2 include:
In fact, many of these things are intertwined.
<img src="pic.gif" alt="Me, en route">
This was badly designed in three ways:
HTML 2 had server-side image maps, that indicated that the image was clickable:
<img src="buttons.gif" ismap>
A problem with this is that the clickable areas were defined on the server, so the browser could give no feedback about where was clickable. For usability this was bad; for accessibility it was a disaster!
Later versions of HTML added client-side image maps, where the clickable areas were defined in the document:
<img src="buttons.gif" usemap="#buttonsmap">
This improved both usability and accessibility.
A facility that was added to HTML 4 was the ability to give a link to a 'long description' of an image:
<img src="temps.gif" longdesc="temps.html" alt="Average temperatures">
The problem with this solution is that hardly anyone uses it (it's inconvenient to use) and there is little browser support for it.
In designing XHTML 2 we decided to do away with a separate concept of an image altogether. Now we just say that there is an equivalence between an external resource and an internal one. For instance
<table src="temperatures.png"> <caption>Average monthly temperatures</caption> <tr> <th>Jan</th> <th>Feb</th>.... <tr> <td>0</td> <td>-4</td>... </table>
A browser that can do images will display the image; others will display the table. Essentially we have moved the longdesc into the document.
This aids device independence, accessibility, and even usability.
The new image facilities allow for fallback:
<abbr src="w3c.png" title="The World Wide Web Consortium"> <span src="w3c.gif">W3C</span> </abbr>
But better still, the type attribute has been extended to mesh with the HTTP 'accept' headers:
<abbr src="w3c" type="image/*" title="...">W3C</span>
<abbr src="w3c" type="image/png, image/gif" title="..."> W3C </abbr>
Web Content Accessibility Guidelines recommends using the client-side
image map<map>
element to indicate navigation blocks.
XHTML2 introduces the navigation list:
<nl> <label>W3C A to Z</label> <li href="/WAI/">Accessibility</li> <li href="/Amaya/">Amaya</li> ...
This gives accessibility, but also helps device independence (can use a menu on a small screen instead of a list).
Navigation lists also replace <map> for image maps.
The <h1> <h2> etc headers have long been an accessibility problem.
<h2>Chapter 1</h2> ... <h3>Section 1</h3> ...
is now:
<section> <h>Chapter 1</h> .... <section> <h>Section 1</h> ... </section> </section>
Ruby is a type of presentation used in East-Asian languages. Markup has been added to support this.
Whitespace behaviour used to be defined in both HTML and CSS. It has now been moved entirely to CSS.
HTML events are a disaster
Problems include:
The new event mechanism is extensible for new event types and 'abstract' events can replace the old device-dependent ones (e.g. 'activate' instead of 'click')
It is independent of scripting language
You can entwine event markup in the document, or separate it out
<a onClick="...javascript..." ...>
becomes
<a ev:event="activate" ev:handler="#myhandler" ...>
Advantages: more types of events, other types of scripting (e.g. declarative), more device independence, more accessibility
Controls are device independent and accessible
Example Form Control
<input ref="/person/date"> <label>Date of birth</label> <hint>Please enter your date of birth</hint> </input>
A user agent has a default presentation.
If the user agent supports it, a stylesheet can be used to define other presentations.
<select ref="icecream/flavors"> <label>Flavours</label> <item><label>Vanilla</label> <value>v</value></item> <item><label>Strawberry</label> <value>s</value></item> <item><label>Chocolate</label> <value>c</value></item> </select>
This example covers both radio-button style selection, and menu selection: not encoded in the control.
As an example of poor usability, current frames are a disaster!
Currently devising XFrames, a replacement for Frames.
Device independence, accessibility and usability are surprisingly closely related.
Even though website builders may not yet know it, device independence, accessibility and usability have a major economic argument in their favour. Spread the word!
More information: www.w3.org