WICG / spatial-navigation

Directional focus navigation with arrow keys
https://drafts.csswg.org/css-nav-1/
Other
216 stars 38 forks source link

How to classify the navigatable element and focusable element? #11

Closed jihyerish closed 6 years ago

jihyerish commented 7 years ago

There is a difference between the focusable element and navigatable element. An element which is navigatable but not focusable (e.g., scrollable area) can contain focusable elements. If there is a JS API for knowing the element is navigatable or focusable, it will be useful for applying the focus navigation to the group of elements.

Here is the similar consideration in WICG discourse: (https://discourse.wicg.io/t/extending-element-level-focus-apis/726)

frivoal commented 6 years ago

The HTML definition of focusable area already includes things like a scroller in addition to normally interactive elements and to tabindexed elements (and a few other things).

jihyerish commented 6 years ago

Yes, focusable is defined in HTML. But there are many terms which are used often while we discuss focus navigation. Something like:

The definition of Keyboard focusable element is in the heuristic spatial navigation algorithm implemented in blink. Do we have to make difference between tabbable and keyboard focusable in the spatial navigation? Also, I think the definition of the term above isn't perfect yet, so I need more opinion. : )

For the reference, you can find out an element is focusable or tabbable in here: https://allyjs.io/data-tables/focusable.html

frivoal commented 6 years ago

This is answered by https://wicg.github.io/spatial-navigation/#find-candidates