Re: [css3-ui][selectors] :focus and nav-* interaction

On Thu, Feb 12, 2015 at 11:18 PM, Florian Rivoal <florian@rivoal.net> wrote:
> (Logged as issue 78 against CSS3-UI)
>
> Selectors 4 states:
>
>   There may be document language or implementation specific
>   limits on which elements can acquire :focus. For example,
>   [HTML5] defines a list of activatable elements.
>
> Selectors 3 has similar language:
>
>   There may be document language or implementation specific
>   limits on which elements can become :active or acquire :focus.
>
> Using the 'nav-up', 'nav-down', 'nav-left' and 'nav-right' properties defined in css3-ui, it is possible for elements which would otherwise be excluded by this limits to become focusable.
>
> It seems reasonable that if such an element is made focusable by the nav-* properties, and is actually focused, the :focus selector should match. This is what Presto does, as you can check here (use opera 12, and use shift + arrows to control spatial navigation):
>
> http://jsbin.com/newage/1/watch?html,css,output
>
> I don't think this is in contradiction with current specs, but there are many levels of indirection and definitions to follow through in both CSS and the HTML specs to determine this, so a clarification in css3-ui would be useful.
>
> I propose adding this to css3-ui:
>
> "If an element that is otherwise not focusable becomes focusable through the use of the directional focus navigation properties, the :focus pseudo-class matches this element when it is focused."
>
> If anyone thinks this is actually incorrect, please let me know.

This works for me.

~TJ

Received on Wednesday, 18 February 2015 18:09:34 UTC