github chakra-ui/zag @zag-js/dialog@1.43.0

latest releases: @zag-js/tree-view@1.43.0, @zag-js/color-utils@1.43.0, @zag-js/navigation-menu@1.43.0...
7 hours ago

Patch Changes

  • 0d23ef3 Thanks
    @segunadebayo! - Improve initial focus selection in dialogs and drawers. Mark
    chrome controls with data-no-autofocus to skip them, or mark the desired target with data-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.

  • 53944e0 Thanks
    @segunadebayo! - Compose data-ownedby values when merging props, match owners as
    tokens in DOM queries, and expose isOwnedBy for 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

Don't miss a new zag release

NewReleases is sending notifications on new releases.