[csswg-drafts] [css-nav-1] Condition of visible candidates for custom spatial navigation container (#3965)

jihyerish has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-nav-1] Condition of visible candidates for custom spatial navigation container ==
[In the current spec](https://drafts.csswg.org/css-nav-1/#find-focusable-areas), the candidates within the spatial navigation container are the visible focusable element in the inside area of the spatial navigation container.
The inside area of **_container C_** is defined as below:

- the optimal viewing region of **_C_** if **_C_** is a scroll container,
- the viewport of **_C_**’s browsing context if **_C_** is a Document,
- the border box of **_C_** otherwise

However, the third case, when the container **_C_** is the element specified with `spatial-navigation-contain: contain` (which means custom spatial navigation container), there are some confusing cases if the inside area is defined as the border box of the container.
For example,
![image](https://user-images.githubusercontent.com/6636090/58311032-01d29f80-7e43-11e9-91de-f1aa6f0cde48.png)

```html
 <div id="container1">
    <div id="container2" style="--spatial-navigation-contain: contain;">
      <button id="b1" style="top:40px; left:-60px; background-color: purple;"></button>
      <button id="b2" style="top:30px; left:200px; background-color: pink;"></button>
    </div>
    <button id="b3" style="top:10px; left: 20px; background-color: green;"></button>
  </div>
```
Depending on the current definition, `button#b1` and `button#b2` aren't included in the candidates of `#container2` because those are out of #container2's the border box.
But `button#b1` and `button#b2` are definitely visible, so someone may feel it's strange.

Therefore how about changing the definition of inside area for the custom spatial navigation container?
It could be changed to **the viewport of the container's browsing context**.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3965 using your GitHub account

Received on Friday, 24 May 2019 07:50:09 UTC