Merge pull request #2227 from jitsi/mobile_testing
feat: add more accessibility labels
This commit is contained in:
commit
c320540fa3
|
@ -30,6 +30,8 @@ export default class Container extends AbstractContainer {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
accessibilityLabel,
|
||||||
|
accessible,
|
||||||
onClick,
|
onClick,
|
||||||
touchFeedback = onClick,
|
touchFeedback = onClick,
|
||||||
visible = true,
|
visible = true,
|
||||||
|
@ -50,7 +52,11 @@ export default class Container extends AbstractContainer {
|
||||||
touchFeedback
|
touchFeedback
|
||||||
? TouchableHighlight
|
? TouchableHighlight
|
||||||
: TouchableWithoutFeedback,
|
: TouchableWithoutFeedback,
|
||||||
{ onPress: onClick },
|
{
|
||||||
|
accessibilityLabel,
|
||||||
|
accessible,
|
||||||
|
onPress: onClick
|
||||||
|
},
|
||||||
element);
|
element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,8 @@ class Conference extends Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
|
accessibilityLabel = 'Conference'
|
||||||
|
accessible = { false }
|
||||||
onClick = { this._onClick }
|
onClick = { this._onClick }
|
||||||
style = { styles.conference }
|
style = { styles.conference }
|
||||||
touchFeedback = { false }>
|
touchFeedback = { false }>
|
||||||
|
|
|
@ -38,6 +38,8 @@ class ToolbarButton extends AbstractToolbarButton {
|
||||||
_renderButton(children) {
|
_renderButton(children) {
|
||||||
const props = {};
|
const props = {};
|
||||||
|
|
||||||
|
'accessibilityLabel' in this.props
|
||||||
|
&& (props.accessibilityLabel = this.props.accessibilityLabel);
|
||||||
'disabled' in this.props && (props.disabled = this.props.disabled);
|
'disabled' in this.props && (props.disabled = this.props.disabled);
|
||||||
'onClick' in this.props && (props.onPress = this._onClick);
|
'onClick' in this.props && (props.onPress = this._onClick);
|
||||||
'style' in this.props && (props.style = this.props.style);
|
'style' in this.props && (props.style = this.props.style);
|
||||||
|
|
|
@ -243,6 +243,7 @@ class Toolbox extends Component {
|
||||||
onClick = { this._onToggleAudio }
|
onClick = { this._onToggleAudio }
|
||||||
style = { audioButtonStyles.style } />
|
style = { audioButtonStyles.style } />
|
||||||
<ToolbarButton
|
<ToolbarButton
|
||||||
|
accessibilityLabel = 'Hangup'
|
||||||
iconName = 'hangup'
|
iconName = 'hangup'
|
||||||
iconStyle = { styles.whitePrimaryToolbarButtonIcon }
|
iconStyle = { styles.whitePrimaryToolbarButtonIcon }
|
||||||
onClick = { this.props._onHangup }
|
onClick = { this.props._onHangup }
|
||||||
|
|
Loading…
Reference in New Issue