Patch 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. -
53944e0Thanks
@segunadebayo! - Composedata-ownedbyvalues when merging props, match owners as
tokens in DOM queries, and exposeisOwnedByfor membership checks. -
Updated dependencies [
2b19978,
0d23ef3,
4e06700,
9ccb894,
53944e0]:- @zag-js/focus-trap@1.43.0
- @zag-js/dom-query@1.43.0
- @zag-js/remove-scroll@1.43.0
- @zag-js/core@1.43.0
- @zag-js/aria-hidden@1.43.0
- @zag-js/dismissable@1.43.0
- @zag-js/anatomy@1.43.0
- @zag-js/types@1.43.0
- @zag-js/utils@1.43.0