feat(Filmstrip): accessibility label for toggle filmstrip button
This commit is contained in:
parent
d19a659871
commit
c170970992
|
@ -614,6 +614,7 @@
|
|||
"speakerStats": "Toggle speaker statistics",
|
||||
"tileView": "Toggle tile view",
|
||||
"toggleCamera": "Toggle camera",
|
||||
"toggleFilmstrip": "Toggle filmstrip",
|
||||
"videomute": "Toggle mute video",
|
||||
"videoblur": "Toggle video blur"
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
sendAnalytics
|
||||
} from '../../../analytics';
|
||||
import { Icon, IconMenuDown, IconMenuUp } from '../../../base/icons';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { dockToolbox } from '../../../toolbox';
|
||||
|
||||
|
@ -87,7 +88,12 @@ type Props = {
|
|||
/**
|
||||
* The redux {@code dispatch} function.
|
||||
*/
|
||||
dispatch: Dispatch<any>
|
||||
dispatch: Dispatch<any>,
|
||||
|
||||
/**
|
||||
* Invoked to obtain translated strings.
|
||||
*/
|
||||
t: Function
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -338,10 +344,12 @@ class Filmstrip extends Component <Props> {
|
|||
*/
|
||||
_renderToggleButton() {
|
||||
const icon = this.props._visible ? IconMenuDown : IconMenuUp;
|
||||
const { t } = this.props;
|
||||
|
||||
return (
|
||||
<div className = 'filmstrip__toolbar'>
|
||||
<button
|
||||
aria-label = { t('toolbar.accessibilityLabel.toggleFilmstrip') }
|
||||
id = 'toggleFilmstripButton'
|
||||
onClick = { this._onToolbarToggleFilmstrip }>
|
||||
<Icon src = { icon } />
|
||||
|
@ -387,4 +395,4 @@ function _mapStateToProps(state) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(_mapStateToProps)(Filmstrip);
|
||||
export default translate(connect(_mapStateToProps)(Filmstrip));
|
||||
|
|
Loading…
Reference in New Issue