open-ui icon indicating copy to clipboard operation
open-ui copied to clipboard

[focusgroup] How does focusgroup interplay with autofocus?

Open keithamus opened this issue 4 months ago • 5 comments

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>

keithamus avatar Mar 07 '24 20:03 keithamus