You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue was not the Switch component not announcing disabled, but the Switch Component doesn't disable click functionality when disabled.
<><Text>This Component is not disabled</Text><SwitchonValueChange={()=>setSwitch(!switchValue)}trackColor={{true: 'yellow',false: 'purple',}}value={switchValue}accessibilityState={{disabled: true}}/><Switch/></>
Expected Result:
The Switch component is disabled.
Actual Result:
The Switch component is NOTdisabled.
Test Cases
In May 2021 I misunderstood the problem facebook/react-native#30944 (comment) and prepared Pull Request facebook/react-native#31199 which added the
accessibilityStateprop to theSwitchcomponent.The issue was not the
Switchcomponent not announcingdisabled, but theSwitchComponent doesn't disable click functionality when disabled.Expected Result:
The Switch component is
disabled.Actual Result:
The Switch component is NOT
disabled.CLICK TO OPEN TESTS RESULTS
2022-02-07.08-49-09.mp4