@zag-js/dom-query@1.43.0
Minor Changes
-
0d23ef3Thanks
@segunadebayo! - Improve initial focus selection in dialogs and drawers. Mark
chrome controls withdata-no-autofocusto skip them, or mark the desired target withdata-autofocus.<div {...api.getContentProps()}> {/* skipped on open, still in tab order */} <button {...api.getCloseTriggerProps()} data-no-autofocus> Close </button> <button data-no-autofocus aria-label="Help"> ? </button> {/* receives initial focus */} <input data-autofocus /> <button>Save</button> </div>
Priority:
initialFocusEl→[data-autofocus]→ first tabbable without[data-no-autofocus]→ content root.
Patch Changes
-
4e06700Thanks
@segunadebayo! - FixproxyTabFocusso tabbing out of portalled content moves to
the next tabbable after the trigger, instead of looping back into the content when the trigger is last on the page. -
53944e0Thanks
@segunadebayo! - Composedata-ownedbyvalues when merging props, match owners as
tokens in DOM queries, and exposeisOwnedByfor membership checks. -
Updated dependencies []:
- @zag-js/types@1.43.0