Przeglądaj źródła

feat: add more accessibility labels

Adds more accessibility labels required for mobile automated testing.
master
paweldomas 7 lat temu
rodzic
commit
cd48ee3dbf

+ 7
- 1
react/features/base/react/components/native/Container.js Wyświetl plik

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 Wyświetl plik

175
     render() {
175
     render() {
176
         return (
176
         return (
177
             <Container
177
             <Container
178
+                accessibilityLabel = 'Conference'
179
+                accessible = { false }
178
                 onClick = { this._onClick }
180
                 onClick = { this._onClick }
179
                 style = { styles.conference }
181
                 style = { styles.conference }
180
                 touchFeedback = { false }>
182
                 touchFeedback = { false }>

+ 2
- 0
react/features/toolbox/components/ToolbarButton.native.js Wyświetl plik

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 Wyświetl plik

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 }

Ładowanie…
Anuluj
Zapisz