W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] accesskey attribute with display:none elements

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Wed, 26 Nov 2008 00:55:21 +0200
Message-ID: <492C8259.8040506@helsinki.fi>
On 11/26/2008 12:39 AM, Benjamin Hawkes-Lewis wrote:
> Olli Pettay wrote:
>>> Couldn't you style such elements visible with :focus and :active?
>> What you mean? How do you focus a display:none element?
>
> Good point. You can't. Isn't that a problem in practice? i.e. When do
> you want a control to have an accesskey but _not_ be focusable?

For example when you want to execute some JS when accesskey is pressed:
<a accesskey="x" href="javascript:doSomething();">
That behavior is used in the web
https://bugzilla.mozilla.org/show_bug.cgi?id=419059&mark=1#c1
The comment mentions dhtml menus and that is a valid use case for
accesskeys in display:none elements.

-Olli
Received on Tuesday, 25 November 2008 14:55:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:45 UTC