Skip to content

Fix/date announcements live region - #55

Merged
wiifree merged 3 commits into
mainfrom
fix/date-announcements-live-region
Nov 22, 2026
Merged

wiifree merged 3 commits into
mainfrom
fix/date-announcements-live-region

Conversation

@wiifree

@wiifree wiifree commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

DatePicker, DateRangePicker and TimePicker announced their parts in English again ("Year, 1990" instead of "Jahr, 1990") with Ark UI 5.40, which apps with ^5.39.3 resolve today.

Cause: @zag-js/live-region 1.47 no longer gives the region the id __live-region__, and creates it once when the field mounts (before translateDateAnnouncements starts watching the body) instead of a new one per announcement.

Fix (@wirecore/wirelayer-recipes, patch – Vue and React use it):

  • the regions are found by data-live-announcer (set by 1.45 and 1.47) or the old id, and regions already in the body are watched from the start
  • every changed region of a mutation batch is translated

Tests

  • unit test for the 1.47 region (no id, created before, reused, cleared first, a later region); the 1.45 test stays
  • the DatePicker integration test reads every data-live-announcer region; with Ark UI 5.40 in the lockfile it was red for Vue and React without the fix and green with it (first CI run of this PR)
  • the lockfile bump to Ark UI 5.40 is reverted here: it also breaks Tour, PinInput and tests that find Ark's permanent empty alert/status regions – that upgrade needs its own PR

…n 1.47

From Ark UI 5.40 (@zag-js/live-region 1.47) the date fields announce
through a region without the id __live-region__, created once when the
field mounts – before translateDateAnnouncements starts – and reused.
The announcements stayed English ("Year, 1990" instead of "Jahr, 1990").

- Find the regions by data-live-announcer (set by both versions) or the
  old id, and watch the ones that are already in the body
- Translate every changed region of a mutation batch, not only the first
- Unit test for the 1.47 region; the DatePicker test reads every region

Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
Apps with ^5.39.3 get Ark UI 5.40 (@zag-js/live-region 1.47) today; the
tests now run against the same version. The ranges stay unchanged.

Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
This reverts commit b6e19ca. Ark UI 5.40 changes more than the live region
of the date fields (Tour, PinInput, permanent empty alert/status regions
in the body) – the upgrade needs its own change. The fix works with both
@zag-js/live-region versions and keeps its unit tests for both.

Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
@wiifree
wiifree merged commit baee207 into main Nov 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant