Skip to content
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

focus delegate code seems wrongly only looking at children #8157

Closed
emilio opened this issue Aug 4, 2022 · 2 comments · Fixed by #8174
Closed

focus delegate code seems wrongly only looking at children #8157

emilio opened this issue Aug 4, 2022 · 2 comments · Fixed by #8174

Comments

@emilio
Copy link
Contributor

emilio commented Aug 4, 2022

(Again, unless I'm missing something)

https://html.spec.whatwg.org/#focus-delegate says:

For each child of parent's children:

  1. Let focusable area be child, if child is a focusable area; otherwise let focusable area be the result of getting the focusable area for child given focus trigger.

It only looks at children, but it seems to (in a note) think that "getting the focusable area" can end up recursing. Which is true, but afaict it only does if the child has delegateFocus, which seems wrong (see #8156).

So I think this should look at all descendants in tree order, which combined with the fix for #8156 would give you the behavior we generally want / expect.

cc @sefeng211 @domenic

@emilio emilio added topic: focus agenda+ To be discussed at a triage meeting labels Aug 4, 2022
@sefeng211
Copy link
Contributor

So should we look for shadow root with delegateFocus and also non shadow host here?

@emilio
Copy link
Contributor Author

emilio commented Aug 5, 2022

Where exactly? "Get a focusable area" already deals with delegatesFocus so I think we don't need to do it twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants