File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ class PickerDialog extends BaseComponent {
56
56
57
57
return (
58
58
< View style = { styles . footer } >
59
- < Text text80 blue30 onPress = { onCancel } style = { cancelLabelStyle } >
59
+ < Text text80 blue30 onPress = { onCancel } accessibilityRole = { onCancel ? 'button' : undefined } style = { cancelLabelStyle } >
60
60
{ cancelLabel }
61
61
</ Text >
62
- < Text text80 blue30 marginL-15 onPress = { onDone } style = { selectLabelStyle } >
62
+ < Text text80 blue30 marginL-15 onPress = { onDone } accessibilityRole = { onDone ? 'button' : undefined } style = { selectLabelStyle } >
63
63
{ doneLabel }
64
64
</ Text >
65
65
</ View >
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class PickerDialog extends BaseComponent {
27
27
28
28
return (
29
29
< View style = { styles . header } >
30
- < Text text70 blue30 onPress = { onCancel } >
30
+ < Text text70 blue30 onPress = { onCancel } accessibilityRole = { onCancel ? 'button' : undefined } >
31
31
{ _ . get ( topBarProps , 'cancelLabel' , 'Cancel' ) }
32
32
</ Text >
33
- < Text text70 blue30 onPress = { onDone } >
33
+ < Text text70 blue30 onPress = { onDone } accessibilityRole = { onDone ? 'button' : undefined } >
34
34
{ _ . get ( topBarProps , 'doneLabel' , 'Done' ) }
35
35
</ Text >
36
36
</ View >
Original file line number Diff line number Diff line change @@ -81,14 +81,12 @@ class Switch extends BaseComponent {
81
81
}
82
82
83
83
getAccessibilityProps ( ) {
84
- const { accessibilityLabel, disabled, value} = this . getThemeProps ( ) ;
85
- const switchState = value ? 'on' : 'off' ;
84
+ const { disabled, value} = this . getThemeProps ( ) ;
86
85
87
86
return {
88
87
accessible : true ,
89
- accessibilityLabel : accessibilityLabel ? `${ accessibilityLabel } ${ switchState } ` : `switch ${ switchState } ` , //TODO: RN60 fix label and role and convert to accessibilityActions
90
- accessibilityRole : 'button' ,
91
- accessibilityStates : disabled ? [ 'disabled' ] : undefined
88
+ accessibilityRole : 'switch' ,
89
+ accessibilityStates : disabled ? [ 'disabled' ] : value ? [ 'checked' ] : [ 'unchecked' ]
92
90
} ;
93
91
}
94
92
You can’t perform that action at this time.
0 commit comments