@@ -110,7 +110,7 @@ export function ColorPicker(props: Props): ReactElement | null {
110110 ) }
111111 < PickerSlider
112112 testID = { `${ props . name } $hue` }
113- accessibilityLabel = { props . hueLabel ?. value || "Hue" }
113+ accessibilityLabel = { ( props . enableAccessibility && props . hueLabel ?. value ) || "Hue" }
114114 value = { color . h }
115115 onValueChange = { onChangeHue }
116116 onValueChangeComplete = { onChangeComplete }
@@ -129,7 +129,7 @@ export function ColorPicker(props: Props): ReactElement | null {
129129 { props . showSaturation && ! colorValue . readOnly && (
130130 < PickerSlider
131131 testID = { `${ props . name } $saturation` }
132- accessibilityLabel = { props . saturationLabel ?. value || "Saturation" }
132+ accessibilityLabel = { ( props . enableAccessibility && props . saturationLabel ?. value ) || "Saturation" }
133133 value = { color . s }
134134 onValueChange = { onChangeSaturation }
135135 onValueChangeComplete = { onChangeComplete }
@@ -144,7 +144,7 @@ export function ColorPicker(props: Props): ReactElement | null {
144144 { props . showLightness && ! colorValue . readOnly && (
145145 < PickerSlider
146146 testID = { `${ props . name } $lightness` }
147- accessibilityLabel = { props . lightnessLabel ?. value || "Brightness" }
147+ accessibilityLabel = { ( props . enableAccessibility && props . lightnessLabel ?. value ) || "Brightness" }
148148 value = { color . l }
149149 onValueChange = { onChangeLightness }
150150 onValueChangeComplete = { onChangeComplete }
@@ -159,7 +159,7 @@ export function ColorPicker(props: Props): ReactElement | null {
159159 { format !== "hex" && props . showAlpha && ! colorValue . readOnly && (
160160 < PickerSlider
161161 testID = { `${ props . name } $alpha` }
162- accessibilityLabel = { props . alphaLabel ?. value || "Transparency" }
162+ accessibilityLabel = { ( props . enableAccessibility && props . alphaLabel ?. value ) || "Transparency" }
163163 value = { color . a }
164164 onValueChange = { onChangeAlpha }
165165 onValueChangeComplete = { onChangeComplete }
0 commit comments