E-mail List Archives
Re: Must elements with onclick handlers be focusable?
From: Patrick H. Lauke
Date: Jul 22, 2014 8:21AM
- Next message: Birkir R. Gunnarsson: "Re: Must elements with onclick handlers be focusable?"
- Previous message: Stanzel, Susan - FSA, Kansas City, MO: "Re: Must elements with onclick handlers be focusable?"
- Next message in Thread: Birkir R. Gunnarsson: "Re: Must elements with onclick handlers be focusable?"
- Previous message in Thread: Stanzel, Susan - FSA, Kansas City, MO: "Re: Must elements with onclick handlers be focusable?"
- View all messages in this Thread
On 22/07/2014 15:00, Stanzel, Susan - FSA, Kansas City, MO wrote:
> Good morning Listers,
>
> Can anyone point me to something which would tell me the proper way to fix such problems. I am now confused whether CSS or JavaScript is the right solution. We are getting WorldSpace and I am sure I will be asked how to fix such problems.
Just as there is no single pattern that can be recognised reliably,
there is also no single solution. In short, there has to be some way to
use the keyboard and also trigger the same behavior that would happen if
the user tapped with a finger/clicked with a mouse on a non-focusable
element with a click handler (note it doesn't necessarily have to be an
onclick attribute...it could be an event listener added programmatically
to the element, or even - if event delegation is used, such as in jQuery
etc - to a parent/ancestor only).
One solution *could* be to add tabindex="0" to the element in question,
making it focusable (but then also adding relevant role="..." attribute
and attaching any other default behavior expected for an element of that
role). Another may be to simply have another focusable element (which
may be a child element, or a completely separate element somewhere else
in the document) that does the same thing. Plus about 100 other
variations on this theme...
P
> Susie Stanzel
>
>
- Next message: Birkir R. Gunnarsson: "Re: Must elements with onclick handlers be focusable?"
- Previous message: Stanzel, Susan - FSA, Kansas City, MO: "Re: Must elements with onclick handlers be focusable?"
- Next message in Thread: Birkir R. Gunnarsson: "Re: Must elements with onclick handlers be focusable?"
- Previous message in Thread: Stanzel, Susan - FSA, Kansas City, MO: "Re: Must elements with onclick handlers be focusable?"
- View all messages in this Thread