Sfoglia il codice sorgente

Merge pull request #2227 from jitsi/mobile_testing

feat: add more accessibility labels
master
Saúl Ibarra Corretgé 7 anni fa
parent
commit
c320540fa3
Nessun account collegato all'indirizzo email del committer

+ 7
- 1
react/features/base/react/components/native/Container.js Vedi File

30
      */
30
      */
31
     render() {
31
     render() {
32
         const {
32
         const {
33
+            accessibilityLabel,
34
+            accessible,
33
             onClick,
35
             onClick,
34
             touchFeedback = onClick,
36
             touchFeedback = onClick,
35
             visible = true,
37
             visible = true,
50
                     touchFeedback
52
                     touchFeedback
51
                         ? TouchableHighlight
53
                         ? TouchableHighlight
52
                         : TouchableWithoutFeedback,
54
                         : TouchableWithoutFeedback,
53
-                    { onPress: onClick },
55
+                    {
56
+                        accessibilityLabel,
57
+                        accessible,
58
+                        onPress: onClick
59
+                    },
54
                     element);
60
                     element);
55
         }
61
         }
56
 
62
 

+ 2
- 0
react/features/conference/components/Conference.native.js Vedi File

179
     render() {
179
     render() {
180
         return (
180
         return (
181
             <Container
181
             <Container
182
+                accessibilityLabel = 'Conference'
183
+                accessible = { false }
182
                 onClick = { this._onClick }
184
                 onClick = { this._onClick }
183
                 style = { styles.conference }
185
                 style = { styles.conference }
184
                 touchFeedback = { false }>
186
                 touchFeedback = { false }>

+ 2
- 0
react/features/toolbox/components/ToolbarButton.native.js Vedi File

38
     _renderButton(children) {
38
     _renderButton(children) {
39
         const props = {};
39
         const props = {};
40
 
40
 
41
+        'accessibilityLabel' in this.props
42
+            && (props.accessibilityLabel = this.props.accessibilityLabel);
41
         'disabled' in this.props && (props.disabled = this.props.disabled);
43
         'disabled' in this.props && (props.disabled = this.props.disabled);
42
         'onClick' in this.props && (props.onPress = this._onClick);
44
         'onClick' in this.props && (props.onPress = this._onClick);
43
         'style' in this.props && (props.style = this.props.style);
45
         'style' in this.props && (props.style = this.props.style);

+ 1
- 0
react/features/toolbox/components/Toolbox.native.js Vedi File

243
                     onClick = { this._onToggleAudio }
243
                     onClick = { this._onToggleAudio }
244
                     style = { audioButtonStyles.style } />
244
                     style = { audioButtonStyles.style } />
245
                 <ToolbarButton
245
                 <ToolbarButton
246
+                    accessibilityLabel = 'Hangup'
246
                     iconName = 'hangup'
247
                     iconName = 'hangup'
247
                     iconStyle = { styles.whitePrimaryToolbarButtonIcon }
248
                     iconStyle = { styles.whitePrimaryToolbarButtonIcon }
248
                     onClick = { this.props._onHangup }
249
                     onClick = { this.props._onHangup }

Loading…
Annulla
Salva