github clauderic/dnd-kit @dnd-kit/accessibility@2.0.0

latest releases: @dnd-kit/core@6.0.8, @dnd-kit/sortable@7.0.2, @dnd-kit/core@6.0.7...
3 years ago

Major Changes

  • 2833337 #186 Thanks @clauderic! - Simplify useAnnouncement hook to only return a single announcement rather than entries. Similarly, the LiveRegion component now only accepts a single announcement rather than `entries.

    • The current strategy used in the useAnnouncement hook is needlessly complex. It's not actually necessary to render multiple announcements at once within the LiveRegion component. It's sufficient to render a single announcement at a time. It's also un-necessary to clean up the announcements after they have been announced, especially now that the role="status" attribute has been added to LiveRegion, keeping the last announcement rendered means users can refer to the last status.

Patch Changes

  • c24bdb3 #184 Thanks @clauderic! - Tweaked LiveRegion component:
    • Entries are now rendered without wrapper span elements. Having wrapper span elements causes VoiceOver on macOS to try to move the VoiceOver cursor to the live region, which interferes with scrolling. This issue is not exhibited when rendering announcement entries as plain text without wrapper spans.
    • Added the role="status" attribute to the LiveRegion wrapper element.
    • Added the white-space: no-wrap; property to ensure that text does not wrap.

Don't miss a new dnd-kit release

NewReleases is sending notifications on new releases.