W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2019

Re: [csswg-drafts] [css-nav-1] Proper definition of 'spatial-navigation-action' property (#4449)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Thu, 07 Nov 2019 00:35:39 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-550565620-1573086938-sysbot+gh@w3.org>
The CSS Working Group just discussed `[css-nav-1] Proper definition of 'spatial-navigation-action' property`.

<details><summary>The full IRC log of that discussion</summary>
&lt;myles> Topic: [css-nav-1] Proper definition of 'spatial-navigation-action' property<br>
&lt;myles> GitHub: https://github.com/w3c/csswg-drafts/issues/4449<br>
&lt;myles> astearns: In the issue, you asked florian for an opinion. We don't have his opinion, and he's not here.<br>
&lt;myles> astearns: should we discuss this now?<br>
&lt;myles> jihye: I also asked another member of CSSWG about this issue. This is general CSS questions. I think we can proceed<br>
&lt;myles> astearns: OK<br>
&lt;chris> Amelia, https://wiki.csswg.org/spec/publish<br>
&lt;myles> jihye: This issue is about spatial navigation actions, and CSS properties.<br>
&lt;myles> jihye: Before going into the detailed discussions, i'd like to introduce spatial navigation actions. They are a CSS property, which can define the behavior for a scrollable element. The spatial navigation behavior is when a scrollable element has focus, and the user triggers spatnav, if there is af ocusable element in the scrollable element, the focus goes to the focusable element. Otherwise, scrolling happens.<br>
&lt;jihye> https://wicg.github.io/spatial-navigation/demo/sample/api_spatial_navigation_action.html<br>
&lt;myles> jihye: IF the focus value is given to this property, spatnav on the scrollable element only works to move. If the scroll value is given, spatnav only works for scrolling the scrollable element. You can see how it works with this link ^^^<br>
&lt;myles> jihye: I'd like to ask that the definition of this property is proper. Currently, the spec describes this property as "which is applied to scroll element, and not inherited" but the point that I'm confused about is the attempted behavior of this property is it also affects the spatnav behavior for children element of the scrollable element. The description says it is only applied to the scrolled element, not all elements. So it sounds like the property will<br>
&lt;myles>  not affect the children element of the scrollable element, which teh spatial navigation action property is specified.<br>
&lt;myles> jihye: It seems like the intended behavior and the description in the spec don't match. Is this proper or not?<br>
&lt;fantasai> no, we resolved to get rid of Media Type<br>
&lt;myles> myles: I thoguht we resolved to get rid of all the "applies to" lines<br>
&lt;myles> AmeliaBR: There was soem discussion about whether it was normative or informative. The question here is you want to change it so the property both affects the scrollable container directly and the children of the scrollable container as far as how it affects whether they trigger scrolling ont he parent<br>
&lt;myles> jihye: I researched another CSS property which can affect its children elements. From my understanding, that property creates a stacking context, but that property is about layout. But this spatnav property isn't about layout, so it doesn't seem like a match<br>
&lt;myles> AmeliaBR: We don't have anything equivalent<br>
&lt;myles> AmeliaBR: Any other CSS property that defines whether a scroll is triggered separate from whether a scrollbar appears on this element or a parent element<br>
&lt;myles> AmeliaBR: It seems to me perfectly natural to say that this also can work on a property on a child element and it affects the scrollers going up. The concern then is what happens if you have nested scrolling containers. Is there a way to control where that scrolling affect stops? Vs if you specifically set the property on the scroll container itself.<br>
&lt;myles> AmeliaBR: Then it's more obvious what it applies to, because nothing bubbles up like an event<br>
&lt;myles> bkardell_: If you have focusable items ....<br>
&lt;myles> bkardell_: As I understand it, the reason this is desirable is because you have potentially a limited number of controls. You don't have tab buttons and shift-tab and things like that, so we want to define how that works with a d-pad controller. "spatially" navigate. So you want to move focus with those sorts of mechanisms. But in this example, you have a scroll container that contains focusable items. But if you use scroll, does it make it effectively not<br>
&lt;myles>  focusable anymore?<br>
&lt;myles> bkardell_: How would someone focus the child?<br>
&lt;myles> jihye: If the value is "scroll" of this property, then the focus will not move inside or move between the child elements in the scrollable element. But pressing down or up arrow key will only scroll the scrollable element. If the focus or auto value is given to this property, the child element inside the focusable element will be focused and the focus will move between them.<br>
&lt;myles> bkardell_: right.<br>
&lt;myles> AmeliaBR: The issue isn't that you can't focus elements when you're using the scroller thing, it's that you don't jump to the next focusable element, you jump to the next element whether its focusable or not, and in that way you end up scrolling the scroll container. Otherwise, it skips the next items and jumps to the next focusable one<br>
&lt;myles> jihye: Yes, that's right<br>
&lt;myles> bkardell_: "auto" makes sense to me, "focus" makes sense to me. They are a different experience of the same thing. But "scroll" ... do we have other CSS properties that prevent your normal focusability?<br>
&lt;myles> myles: we have display:none...<br>
&lt;myles> bkardell_: but it's not on the screen<br>
&lt;myles> jihye: the "scroll" value is at risk. It can be useful when there is an iframe which can scroll but the user doesn't want to move inside it.<br>
&lt;myles> jihye: But I think this is a little bit out of the topic that I wanted to discuss.<br>
&lt;myles> jihye: I wanted to discuss - this property can apply to child elements of scrollable elements. Is this proper or not?<br>
&lt;myles> heycam: Generally, the "applies to" line is informative and not normative (as AmeliaBR was saying). It's just a general description of where you expect the property to have an effect. The behavior of scrolling will depend on the child elements and their focusability. It makes sense to say it applies to the scrollable element. The rest of the definition can say what it wants about the child elements and how they are focused.<br>
&lt;fantasai> yes, it's about on what elements can you set the property to have an effect<br>
&lt;myles> AmeliaBR: You mentioned in the issue, if we switch to that model where its a property of the individual elements rather than a property of the scroller, it needs to be inherited.<br>
&lt;myles> AmeliaBR: It would be a normative change<br>
&lt;myles> myles: can we make this match how scroll snapping works?<br>
&lt;myles> AmeliaBR: how does scroll snapping work?<br>
&lt;myles> &lt;silence><br>
&lt;myles> fantasai: scroll-snap sets something on the scroll container to define how snapping happens, and there are additional properties on child elements about whether that child should be paying attention to it. &lt;provides an example><br>
&lt;myles> myles: sounds to me that this should go on the scroller for spatnav<br>
&lt;myles> astearns: Another argumetn for putting it on the scroll container and having it not inherit, is we might get an incoherent set of things to do if the some subset of elements disagree about which value is specified. Inheriting to the children means the children can override what's on the container.<br>
&lt;myles> jihye: If we match the spatnav action navigation property with scroll snap, then we'll change the definition to say it applies to all elements and its inherited?<br>
&lt;myles> astearns: I'm arguing for it to stay the way it is. Where it applies to scroll containers and does not inherite. You can define how the children behave as saying "look at your nearest ancestor that its a scroll container and see what its spatnav action is"<br>
&lt;myles> jihye: It means that the current definition of the spec is reasonable and doesn't have to change.<br>
&lt;myles> astearns: yes<br>
&lt;myles> AmeliaBR: yes, unless you can come up with a specific example where you'd want the behavior to change partway through a scrollable container. I don't know what that might look like. Where you actually want different children to have different behaviors.<br>
&lt;myles> astearns: Can you think of a case where you'd have a scroll container where some of its children would want to focus and others would want to scroll?<br>
&lt;myles> &lt;silence><br>
&lt;myles> astearns: Why don't we resolve on this issue, saying we are not going to change the definition of how spatial-navigation-action at this point, but if come up with a use case for making the property inherit, we can change it at that point.<br>
&lt;myles> jihye: okay<br>
&lt;myles> jihye: The spatial-navigation-action property behaves as defined, and does not inherit.<br>
&lt;myles> astearns: Is there an issue for the scroll value? Is that why it's at risk?<br>
&lt;myles> jihye: It seems like the scroll value is less important than other values such as "auto" or "focus". This is the main reason.<br>
&lt;myles> astearns: bkardell_ could I have you take a longer look at this, and if you have concerns about the "scroll" value changing the focus behavior, have you raise an issue on it?<br>
&lt;myles> bkardell_: Yes. It's been a while since I looked at this.<br>
&lt;myles> bkardell_: In Toronto, we had &lt;missed> from google present an interesting related thing. jihye, have you worked with him?<br>
&lt;dbaron> s/&lt;missed>/David Bokan/<br>
&lt;myles> jihye: Yes, I talk with him regularly. We are investigating about that concept. I think this concept is not mature enough. We have to think about more details about that. We are working on that.<br>
&lt;myles> bkardell_: He would be good to review the question I raised. I can talk to him<br>
&lt;myles> jihye: thank you.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4449#issuecomment-550565620 using your GitHub account
Received on Thursday, 7 November 2019 00:35:41 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:56 UTC