Skip to content

Commit

Permalink
Merge pull request #2170 from gluestack/fix/slider-build
Browse files Browse the repository at this point in the history
fix: slider build fix
  • Loading branch information
Viraj-10 authored May 20, 2024
2 parents 7d19628 + c8b1773 commit be53f36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/storybook-nativewind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"expo-linear-gradient": "^12.3.0",
"expo-status-bar": "~1.4.2",
"fs": "^0.0.1-security",
"lucide-react-native": "^0.378.0",
"lucide-react-native": "^0.236.0",
"nativewind": "^4.0.36",
"next": "^13.5.3",
"prism-react-renderer": "^1.3.5",
Expand Down
4 changes: 3 additions & 1 deletion packages/react-native-aria/slider/src/useSlider.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <input type="range"> elements when clicking on an associated <label>,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16144,7 +16144,7 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"

nativewind@^4.0.36:
nativewind@4.0.36, nativewind@^4.0.36:
version "4.0.36"
resolved "https://registry.yarnpkg.com/nativewind/-/nativewind-4.0.36.tgz#25a79d37cd89575f92d6095749a1620195459b30"
integrity sha512-nd0Xgjzaq0ISvUAjibZXcuSvvpX1BGX2mfOGBPZpjGfHL3By6fwLGsNhrKU6mi2FF30c+kdok3e2I4k/O0UO1Q==
Expand Down

0 comments on commit be53f36

Please sign in to comment.