-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Probably-wrong focus requirement #3675
Comments
We should try harder to figure out what "empty" means I guess, since it shows up in several other parts of the focus spec. Maybe we could get some info on when activeElement ever returns null in implementations? |
Both Gecko and Blink implement I think basically there are three states for the focusable area of a document, per the post-#3647 spec:
So here "empty" would mean "has no child nodes at all". This is hard to test because I think I can work on a PR to clean this and related areas up after #3647 lands... |
This ends up logging |
The original spec was talking about "empty control group", such as a @annevk I don't understand your comment. Could you elaborate? |
@TakayoshiKochi if you paste that into https://software.hixie.ch/utilities/js/live-dom-viewer/ and tab around you'll see you can trigger the listener. That means that at least with manual tests the scenarios @domenic mentions can be tested to some extent. |
The control group concept existed to give special focus behavior to <dialog> elements, treating them on par with Documents in terms of allowing focus to shift inside of them. However, this was never implemented in user agents. This change removes the control group concept, instead using Document directly. This allows some simplifications, e.g. because the first focusable area of a non-empty Document is always the Document's viewport. The change uncovered some areas of the spec that were potentially wrong or unclear when considering focus around documents. We will follow up on that in #3675. But for now we keep the same algorithms, just without <dialog>s. Fixes #2171.
The PR #3647 removed "control group" concept, and most of them were converted to Document. The "control group" could be empty when e.g. no focusable element in a dialog element, but for a document without any focusable element, its viewport is still focusable. Removes sentences talking about such a non-existent Document condition. Fixes #3675.
The control group concept existed to give special focus behavior to <dialog> elements, treating them on par with Documents in terms of allowing focus to shift inside of them. However, this was never implemented in user agents. This change removes the control group concept, instead using Document directly. This allows some simplifications, e.g. because the first focusable area of a non-empty Document is always the Document's viewport. The change uncovered some areas of the spec that were potentially wrong or unclear when considering focus around documents. We will follow up on that in whatwg#3675. But for now we keep the same algorithms, just without <dialog>s. Fixes whatwg#2171.
The PR whatwg#3647 removed "control group" concept, and most of them were converted to Document. The "control group" could be empty when e.g. no focusable element in a dialog element, but for a document without any focusable element, its viewport is still focusable. Removes sentences talking about such a non-existent Document condition. Fixes whatwg#3675.
Discovered this while reviewing #3647. /cc @TakayoshiKochi
I can't find where this might be applied. It's kind of ambiguous what "empty Document" means; an active Document that is not inert always has the viewport as a focusable area, so maybe it's not "empty"? It can't mean "has no child nodes", since there will almost always be a html element at least...
https://jsbin.com/loxilon/edit?html,console,output shows no real change here.
Probably we should just remove this? Unless someone can figure out what it was trying to do?
The text was updated successfully, but these errors were encountered: