Browse Source

feat(Filmstrip): accessibility label for toggle filmstrip button

master
paweldomas 5 years ago
parent
commit
c170970992
2 changed files with 11 additions and 2 deletions
  1. 1
    0
      lang/main.json
  2. 10
    2
      react/features/filmstrip/components/web/Filmstrip.js

+ 1
- 0
lang/main.json View File

@@ -614,6 +614,7 @@
614 614
             "speakerStats": "Toggle speaker statistics",
615 615
             "tileView": "Toggle tile view",
616 616
             "toggleCamera": "Toggle camera",
617
+            "toggleFilmstrip": "Toggle filmstrip",
617 618
             "videomute": "Toggle mute video",
618 619
             "videoblur": "Toggle video blur"
619 620
         },

+ 10
- 2
react/features/filmstrip/components/web/Filmstrip.js View File

@@ -10,6 +10,7 @@ import {
10 10
     sendAnalytics
11 11
 } from '../../../analytics';
12 12
 import { Icon, IconMenuDown, IconMenuUp } from '../../../base/icons';
13
+import { translate } from '../../../base/i18n';
13 14
 import { connect } from '../../../base/redux';
14 15
 import { dockToolbox } from '../../../toolbox';
15 16
 
@@ -87,7 +88,12 @@ type Props = {
87 88
     /**
88 89
      * The redux {@code dispatch} function.
89 90
      */
90
-    dispatch: Dispatch<any>
91
+    dispatch: Dispatch<any>,
92
+
93
+    /**
94
+     * Invoked to obtain translated strings.
95
+     */
96
+    t: Function
91 97
 };
92 98
 
93 99
 /**
@@ -338,10 +344,12 @@ class Filmstrip extends Component <Props> {
338 344
      */
339 345
     _renderToggleButton() {
340 346
         const icon = this.props._visible ? IconMenuDown : IconMenuUp;
347
+        const { t } = this.props;
341 348
 
342 349
         return (
343 350
             <div className = 'filmstrip__toolbar'>
344 351
                 <button
352
+                    aria-label = { t('toolbar.accessibilityLabel.toggleFilmstrip') }
345 353
                     id = 'toggleFilmstripButton'
346 354
                     onClick = { this._onToolbarToggleFilmstrip }>
347 355
                     <Icon src = { icon } />
@@ -387,4 +395,4 @@ function _mapStateToProps(state) {
387 395
     };
388 396
 }
389 397
 
390
-export default connect(_mapStateToProps)(Filmstrip);
398
+export default translate(connect(_mapStateToProps)(Filmstrip));

Loading…
Cancel
Save