Confirmed users
290
edits
(Start of introduction about ARIA in chat) |
|||
Line 1: | Line 1: | ||
Many chat solutions these days are web-technology-based. In this case, we are not just speaking about web-based chat solutions like [http://www.mibbit.com/ Mibbit], [http://www.meebo.com/ Meebo], [http://www.aim.com/aimexpress.adp AIM Express], [http://webmessenger.msn.com/ MSN Web Messenger], etc., but even about client-side applications like [http://www.adiumx.com/ Adium], [http://www.google.com/talk/ Google Talk], and so on. Even these client-side applications use web technology in order to achieve what they need to do (and in fact, some IM protocols use HTML to transfer richly formatted text and so on). | Many chat solutions these days are web-technology-based. In this case, we are not just speaking about web-based chat solutions like [http://www.mibbit.com/ Mibbit], [http://www.meebo.com/ Meebo], [http://www.aim.com/aimexpress.adp AIM Express], [http://webmessenger.msn.com/ MSN Web Messenger], etc., but even about client-side applications like [http://www.adiumx.com/ Adium], [http://www.google.com/talk/ Google Talk], and so on. Even these client-side applications use web technology in order to achieve what they need to do (and in fact, some IM protocols use HTML to transfer richly formatted text and so on). | ||
In order to make such applications or websites accessible to the blind and visually impaired, authors can make use of [http://www.w3.org/WAI/intro/aria ARIA] markup to signify the | In order to make such applications or websites accessible to the blind and visually impaired, authors can make use of [http://www.w3.org/WAI/intro/aria ARIA] markup to signify the function of elements of the page or application. In particular, they can indicate which part of an HTML document is a (chat) log, and prioritize messages inside this log. In the remainder of this document I will first detail the relevant markup, and then provide some concrete examples from [http://mail.google.com/support/bin/answer.py?answer=29292 Google Talk in GMail], [http://support.mozilla.com/en-US/kb/live+chat Mozilla Live Chat], and [http://chatzilla.hacksrus.com/ ChatZilla]. | ||
== ARIA markup for chat logs == | == ARIA markup for chat logs == | ||
The WAI-ARIA specification allows web authors to specify the '''functionality''' of parts of a page in a way that does not affect the visual properties of the page or its elements. Accessibility tools, such as screenreaders, can make use of this information in order to provide better access to users. For example, if a | The WAI-ARIA specification allows web authors to specify the '''functionality''' of parts of a page in a way that does not affect the visual properties of the page or its elements. Accessibility tools, such as screenreaders, can make use of this information in order to provide better access to users. For example, if a <span> is really a button, the author can use <tt>role="button"</tt> to indicate that this particular span is actually meant to be a button, and a screenreader will then present this element as a button rather than a piece of text on the page (as it would normally do for a span). This enables the user to interact with it in a way they would normally interact with a button, just as a sighted user would normally be able to do (assuming the span in question looked like a button in some obvious way). | ||
By specifying various ARIA attributes, we can thus instruct the Assistive Technology software on what we mean. I will introduce each of the relevant attributes in the following subsections. | |||
=== <tt>role="log"</tt> === | |||
In the case of chat, there is a particular role that may be used: '''log'''. Once you specify this (using the attribute <tt>role="log"</tt>), the AT software knows that it is a log of some kind. In principle this could be any kind of log (console output, for example, or an error log from a server operation, could also qualify). You can use it on different tags: ChatZilla uses it on a <tt><table></tt> in which it outputs chat messages, Mozilla Live Chat uses it on a <tt><div></tt>. | |||
Implicitly, assigning this role to an element will cause the AT software to consider your element as a '''live region'''. A live region is a part of the page in which the AT should expect elements to be added or removed, and the text nodes inside the element to be changed as well. In particular, for a [http://www.w3.org/WAI/PF/aria/#log log], the AT is supposed to assume that: | |||
* the information is logically sequenced. | |||
* the information is added to the ''end'' of the log. | |||
* the information ought to be announced at a default politeness level of 'polite' (see next section). | |||
=== <tt>aria-live</tt> === | |||
The <tt>aria-live</tt> attribute can be used to indicate a '''politeness level'''. The concept of a politeness level is there to be able to indicate the priority of messages. Sighted humans have the comfortable ability to scan a range of visual information without going to the trouble of actually reading and understanding it all. For example, if you ask a question in a multi-user chatgroup to one specific person, you ignore other people's messages without reading all of them. Because this is not possible for users of AT tools, we need to provide some information to the AT as to how important the information is, in other words, how polite it should be about interrupting the user's work with it. Error messages about the connection to the server may be more important than messages from the contact with whom the user is talking, for example. | |||
ARIA knows 3 levels of politeness: ''off'', ''polite'' and ''assertive''. ''off'' does what it says on the tin. ''polite'' is the default, and AT software should announce those messages without interrupting the user. ''assertive'' is to be used for more important messages, for which the AT software should interrupt the user. | |||
The default for <tt>role="log"</tt> elements is ''polite'', but you may change this by adding an attribute to the element, eg. <tt>aria-polite="assertive"</tt>. Furthermore, you can add such attributes to individual messages, so you could specify <tt>aria-polite="polite"</tt> on the log, but for some individual messages (eg. connection errors, or in multi-user rooms, messages that mention your name) you could then specify <tt>aria-polite="assertive"</tt> in order to emphasise them. | |||
=== <tt>aria-relevant</tt> === | |||
XXXFIXME: not finished, obviously | XXXFIXME: not finished, obviously |