From 2934e3250ab462fb44f1b285fbefd660ead438a4 Mon Sep 17 00:00:00 2001 From: Damini Date: Mon, 20 May 2024 14:21:47 +0530 Subject: [PATCH 1/2] fix: slider build fix --- packages/react-native-aria/slider/src/useSlider.web.ts | 4 +++- yarn.lock | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native-aria/slider/src/useSlider.web.ts b/packages/react-native-aria/slider/src/useSlider.web.ts index 742971b6f0..b97aba5741 100644 --- a/packages/react-native-aria/slider/src/useSlider.web.ts +++ b/packages/react-native-aria/slider/src/useSlider.web.ts @@ -186,11 +186,13 @@ function useSliderWeb( } }; - if (labelProps.htmlFor) { + //@ts-ignore + if (labelProps.htmlFor !== undefined) { // Ideally the `for` attribute should point to the first thumb, but VoiceOver on iOS // causes this to override the `aria-labelledby` on the thumb. This causes the first // thumb to only be announced as the slider label rather than its individual name as well. // See https://bugs.webkit.org/show_bug.cgi?id=172464. + //@ts-ignore delete labelProps.htmlFor; labelProps.onClick = () => { // Safari does not focus elements when clicking on an associated