feat: add more accessibility labels

Adds more accessibility labels required for mobile automated testing.
This commit is contained in:
paweldomas 2017-11-28 11:50:34 -06:00
parent e4ed02815f
commit cd48ee3dbf
4 changed files with 12 additions and 1 deletions

View File

@ -30,6 +30,8 @@ export default class Container extends AbstractContainer {
*/
render() {
const {
accessibilityLabel,
accessible,
onClick,
touchFeedback = onClick,
visible = true,
@ -50,7 +52,11 @@ export default class Container extends AbstractContainer {
touchFeedback
? TouchableHighlight
: TouchableWithoutFeedback,
{ onPress: onClick },
{
accessibilityLabel,
accessible,
onPress: onClick
},
element);
}

View File

@ -175,6 +175,8 @@ class Conference extends Component {
render() {
return (
<Container
accessibilityLabel = 'Conference'
accessible = { false }
onClick = { this._onClick }
style = { styles.conference }
touchFeedback = { false }>

View File

@ -38,6 +38,8 @@ class ToolbarButton extends AbstractToolbarButton {
_renderButton(children) {
const props = {};
'accessibilityLabel' in this.props
&& (props.accessibilityLabel = this.props.accessibilityLabel);
'disabled' in this.props && (props.disabled = this.props.disabled);
'onClick' in this.props && (props.onPress = this._onClick);
'style' in this.props && (props.style = this.props.style);

View File

@ -243,6 +243,7 @@ class Toolbox extends Component {
onClick = { this._onToggleAudio }
style = { audioButtonStyles.style } />
<ToolbarButton
accessibilityLabel = 'Hangup'
iconName = 'hangup'
iconStyle = { styles.whitePrimaryToolbarButtonIcon }
onClick = { this.props._onHangup }