openui / openui/open-ui

[focusgroup] How does focusgroup interplay with autofocus?

Open
#1,013 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

focusgroup needs-triage
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

In https://github.com/openui/open-ui/issues/989 we discussed a scenario for orthogonal focus groups; say you have something like:

<div focusgroup=horizontal>
  <button></button>
  <button invoketarget=more-menu>More</button>
  <div popover id=more-menu focusgroup=vertical>
    <button autofocus></button>    
  </div>
</div>

Supposedly, opening the popover menu would land focus on the button, and then the vertical group would focus? What happens in light of the resolutions in https://github.com/openui/open-ui/issues/989 where the element with focusgroup is part of the group?

Perhaps also interesting, what if we change from invoketarget to interesttarget?

<div focusgroup=horizontal>
  <button></button>
  <button interesttarget=more-menu>More</button>
  <div popover id=more-menu focusgroup=vertical>
    <button autofocus></button>    
  </div>
</div>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the resolutions in openui/open-ui#989, then compare the invoketarget and interesttarget examples in this issue. Determine how focusgroup and autofocus interact when the popover opens, and document the resulting behavior or required resolution for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.