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 {
5656
5757 return (
5858 < View style = { styles . footer } >
59- < Text text80 blue30 onPress = { onCancel } style = { cancelLabelStyle } >
59+ < Text text80 blue30 onPress = { onCancel } accessibilityRole = { onCancel ? 'button' : undefined } style = { cancelLabelStyle } >
6060 { cancelLabel }
6161 </ 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 } >
6363 { doneLabel }
6464 </ Text >
6565 </ View >
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class PickerDialog extends BaseComponent {
2727
2828 return (
2929 < View style = { styles . header } >
30- < Text text70 blue30 onPress = { onCancel } >
30+ < Text text70 blue30 onPress = { onCancel } accessibilityRole = { onCancel ? 'button' : undefined } >
3131 { _ . get ( topBarProps , 'cancelLabel' , 'Cancel' ) }
3232 </ Text >
33- < Text text70 blue30 onPress = { onDone } >
33+ < Text text70 blue30 onPress = { onDone } accessibilityRole = { onDone ? 'button' : undefined } >
3434 { _ . get ( topBarProps , 'doneLabel' , 'Done' ) }
3535 </ Text >
3636 </ View >
Original file line number Diff line number Diff line change @@ -81,14 +81,12 @@ class Switch extends BaseComponent {
8181 }
8282
8383 getAccessibilityProps ( ) {
84- const { accessibilityLabel, disabled, value} = this . getThemeProps ( ) ;
85- const switchState = value ? 'on' : 'off' ;
84+ const { disabled, value} = this . getThemeProps ( ) ;
8685
8786 return {
8887 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' ]
9290 } ;
9391 }
9492
You can’t perform that action at this time.
0 commit comments