Re: Keyboard accessibility of More Options

Hello,

On Jan 6, 2007, at 04:24 , olivier Thereaux wrote:

> For the last one, however, I understand why you used it this way,  
> I'm just hoping we can do something better. We can, as I have done  
> it for now, simply hardcode the text of the paragraph into the js.  
> But the toggle.js is also used for other areas (e.g the validation  
> results, which have been broken by the changes to the javascript -  
> gotta fix that at some point) so it would be best to have the text  
> be variable.
[...]
>
> But then there's the question of localization... The text should be  
> different depending on the display language. So maybe the text of  
> the link should be given in a title attribute in each of the  
> localized files?

A boring plane flight gave me inspiration for a solution to this.  
Since we generally have

<div>
<h2>title of the div</h2>
...
stuff to be made invisible and toggle-able
</div>

We could reuse the text of the h2 (or whatever element the title is  
in) by identifying it with a specific class. And then use the text to  
create an element outside of the div, and put said text in a pseudo- 
link.

Hence:
http://dev.w3.org/cvsweb/~checkout~/2002/css-validator/toggle.js?rev=1.4

The last improvement I'd like to add eventually would be adding  
title="" to the pseudo link, but that's really icing on the cake.

Speaking of accessibility of the form, I also added labels for all  
the selects, as suggested by Roberto Scano.

-- 
olivier

Received on Monday, 15 January 2007 02:58:30 UTC