W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2005

RE: Javascript question

From: John Carpenter <John.Carpenter@pdms.com>
Date: Fri, 7 Jan 2005 15:35:31 -0000
Message-ID: <C5B5C6910E1E014F9A91396FCDDABE26C97592@cs002.castletown.pdms.com>
To: <w3c-wai-ig@w3.org>

Hi Patrick,

Thanks very much for the reply.
 
> > - The "hover" effect does not appear to have a keyboard 
> alternative as 
> > far as I can tell.  Therefore the menu will only work with 
> the mouse.
> 
> Using :hover alone, that's true. You should look at doubling 
> it up with the :focus pseudo-class - and as far as I 
> remember, IE gets it wrong in this respect and mistakenly 
> wants :active as well...*sigh*
> 
> I usually do something like:
> 
> element:focus, element:hover, element:active { /*rules*/ }

Do you have an example of this working?  I tried this but it didn't seem
to work (but that's probably my coding!)

I did experiment with onfocus in Javascript to do something similar but
as the sub-menu received focus, its parent lost focus and because of the
order of events it seemed virtually impossible to keep the menu open.
It may be that clever use of CSS is the way round this.

John
Received on Friday, 7 January 2005 15:36:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:19 GMT