Re: [csswg-drafts] [cssom-view] Define steps / an algorithm perform a scroll in a given direction without an explicit position

I agree that we probably need to define what happens when user presses keys. I could find some default behavior of arrow keys and enter key operated in major browsers below.

**arrow keys**
- buttons (move the focus into other enighboring radio button)
- textarea (move the cursor in the direction)
- general document (scroll the page, if it overflows)

**enter key**
- all buttons (invoke a click event)
- hyperlink (invoke a click event)
- input elements in a form (submit)
- textarea (CRLF)

If we enable the spatial navigation in the browser, we should carefully set the priority for each key input.
You can see some behavior described above in the following example.
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5825

However, I'm not sure how to define the things rolled by @frivoal. It seems a natural result when scrolling in a given direction without an explicit position. If I change the default wheel offset in the control panel in Win10 and handle the wheel in the browser, it works as the operating system's settings. It's not for the browser, but for the underlying platform. The scroll offset change by the arrow key input would be different with the wheel case, but it also seems a natural result and not changeable by web engine as well as authors. I wonder how and where we could use the algorithm.

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

Received on Tuesday, 13 March 2018 10:46:34 UTC