Repository navigation
Fix/date announcements live region - #55
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.3resolve today.Cause:
@zag-js/live-region1.47 no longer gives the region the id__live-region__, and creates it once when the field mounts (beforetranslateDateAnnouncementsstarts watching the body) instead of a new one per announcement.Fix (
@wirecore/wirelayer-recipes, patch – Vue and React use it):data-live-announcer(set by 1.45 and 1.47) or the old id, and regions already in the body are watched from the startTests
data-live-announcerregion; 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)