- From: Brian Kardell <bkardell@gmail.com>
- Date: Mon, 15 Jun 2015 12:34:15 -0400
- To: Jonathan Neal <jonathantneal@hotmail.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Mon, Jun 15, 2015 at 11:15 AM, Jonathan Neal <jonathantneal@hotmail.com> wrote: > When I was testing a website for keyboard accessibility, I noticed that most > of its failures were due to hover styles not being applied to elements > "hovered over" using the tab key. The solution was to add :focus selectors > to :hover rules. This got me thinking about a problem many designers and > developers run into with :hover. > > The :hover pseudo-class applies while the user designates an element with a > pointing device... > > - CSS4 specification (http://dev.w3.org/csswg/selectors/#hover-pseudo) > > Limiting the :hover pseudo-class to pointing devices was a real missed > opportunity for keyboard accessibility. The naming of :hover is somewhat > misleading, as it specifically means elements "designated" with a pointing > device, rather than any form of input. > > I propose we add a common pseudo-class for :hover and :focus. A good name > could be :enter, as it is harmonious with PointerEvents, and it shares an > intrinsic association with keyboards. > > The :enter pseudo-class applies while the user designates an element with a > keyboard, pointing device, or other form of input. > > > To test and perhaps implement this pseudo-class in the wild, I’ve created a > polyfill / prollyfill. > > https://github.com/jonathantneal/postcss-pseudo-class-enter > > Best, > Jonathan But hover isn't focus - not all elements are focusable but I'm pretty sure they are all hoverable? -- Brian Kardell :: @briankardell :: hitchjs.com
Received on Monday, 15 June 2015 16:34:43 UTC