mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix inability to remove 'Disabled' state from AccessibilityStates
Summary: D8842691 split AccessibilityTraits into multiple RN properties. However, the accessor code did not support REMOVING traits. This results in buttons that were disabled (AccessibilityTraits & NotEnabled === true) never being enabled. Fix the issue by making the split accessors properly mask in the bits, allowing you unset them without disturbing bits managed by the other accessor. NOTE: setting AccessibilityTraits and AccessibilityRole or AccessibilityStates will still result in bugs. Reviewed By: shergin Differential Revision: D9661970 fbshipit-source-id: 77d70dd0754f2eaf8cbf895bfc13757c697a76d8
This commit is contained in:
committed by
Lorenzo Sciandra
parent
26b5a6e002
commit
79b33118ea
@@ -84,6 +84,7 @@ module.exports = {
|
||||
'radiobutton_checked',
|
||||
'radiobutton_unchecked',
|
||||
],
|
||||
// This must be kept in sync with the AccessibilityRolesMask in RCTViewManager.m
|
||||
AccessibilityRoles: [
|
||||
'none',
|
||||
'button',
|
||||
@@ -97,5 +98,6 @@ module.exports = {
|
||||
'header',
|
||||
'summary',
|
||||
],
|
||||
// This must be kept in sync with the AccessibilityStatesMask in RCTViewManager.m
|
||||
AccessibilityStates: ['selected', 'disabled'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user