Re: [csswg-drafts] Make things focusable in CSS (#3379)

---

Migrated from https://github.com/WICG/spatial-navigation/issues/25#issuecomment-374461916
Originally created by @frivoal on *Tue, 20 Mar 2018 03:33:04 GMT*

---
@bradkemper This is not at all what I planned to be doing with this issue, but I wasn't clear, and this is more important topic than the original one :D

> I wasn’t clear from the prose whether spacial-navigation: active was supposed to make an element navigable by arrows, or if it was something that applied to an ancestor.

It was meant to be applied to ancestors, so that's a separate thing. (and it's probably going to be dropped or pushed to the next level anyway, see https://github.com/WICG/spatial-navigation/issues/35)

> I’ve been trying to get to in some of my other comments, is a way to specify, in CSS, that an element can be tabbed to or arrowed to (previously imagined as tab-index:0 and arrow-index:0).
>
> Maybe something like focusable: [tab | arrows | none].

This issue has come up before in the CSSWG. I think last time the rough conclusion was that although selectors may be a convenient way to set this up, there was no strong coupling between focusability and style, while there was strong coupling between focusability and semantics (i.e. HTML/DOM) and between focusability and attached behaviors (JS/DOM).

The fact that this isn't about styling isn't a blocker in my mind, but and selectors are a nice mechanism. But the fact that it doesn't seem to be strongly coupled with style does make me question whether it belongs in CSS.

I think it would be very interesting if we could restart that discussion (here or even better in the CSSWG) base on use cases that support:
- why markup/DOM or a js API isn't the right place for that kind of switch
- why we need to distinguish between tab focusing vs arrow focusing

Since you've been working on that sort of things, do you think you could write these down?

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3379#issuecomment-443617792 using your GitHub account

Received on Monday, 3 December 2018 07:47:45 UTC