Re: [csswg-drafts] [css-nav-1] FocusTraversal API (#3944)

@arei I like this and have wanted this multiple times, especially `forward()`.

`focus`, `forward`, and `backward` should take the same options as `element.focus()` but did not see that mentioned anywhere.

One thing that I don't see a simple way to do is to get the first or last focusable element of a container. I can't think of a use for `last` at the moment, but `first` would be useful for cases like opening a dialog-type element and focusing the first element. If not provided an element, those could return the first and last focusable element of the document.

Similarly, `orderedElements` could take an optional element to search in, defaulting to `:root`.

What is the use case for the history list and why is a small library that records the focus events insufficient? (Since intent can be hard to read over the internet, let me clarify that I am genuinely curious and interested).

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

Received on Wednesday, 22 May 2019 23:45:55 UTC