Skip to content
Snippets Groups Projects
Commit e96bbc3c authored by Jessie Keck's avatar Jessie Keck
Browse files

Add an aria-label to the sidebar panel navigation Tabs/Nav.

parent 73e3bfb5
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@ export class WindowSideBar extends Component {
*/
render() {
const {
classes, windowId, sideBarOpen,
classes, t, windowId, sideBarOpen,
} = this.props;
return (
......@@ -24,7 +24,11 @@ export class WindowSideBar extends Component {
className={classNames(classes.drawer)}
classes={{ paper: classNames(classes.paper) }}
anchor="left"
PaperProps={{ component: 'nav', style: { position: 'relative' } }}
PaperProps={{
'aria-label': t('sidebarPanelsNavigation'),
component: 'nav',
style: { position: 'relative' },
}}
SlideProps={{ mountOnEnter: true, unmountOnExit: true }}
open={sideBarOpen}
>
......@@ -38,6 +42,7 @@ export class WindowSideBar extends Component {
WindowSideBar.propTypes = {
classes: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types,
sideBarOpen: PropTypes.bool,
t: PropTypes.func.isRequired,
windowId: PropTypes.string.isRequired,
};
......
......@@ -156,6 +156,7 @@ export class WindowSideBarButtons extends Component {
indicatorColor="secondary"
textColor="secondary"
aria-orientation="vertical"
aria-label={t('sidebarPanelsNavigation')}
ref={ref => this.setTabsRef(ref)}
>
<Tab
......
import { connect } from 'react-redux';
import { compose } from 'redux';
import { withStyles } from '@material-ui/core';
import { withTranslation } from 'react-i18next';
import { withPlugins } from '../extend';
import { WindowSideBar } from '../components/WindowSideBar';
import { getWindow } from '../state/selectors';
......@@ -43,6 +44,7 @@ const styles = theme => ({
const enhance = compose(
withStyles(styles),
withTranslation(),
connect(mapStateToProps, null),
withPlugins('WindowSideBar'),
);
......
......@@ -58,6 +58,7 @@
"settings": "Settings",
"showingNumAnnotations": "Showing {{number}} annotations",
"showZoomControls": "Show zoom controls",
"sidebarPanelsNavigation": "Sidebar panels navigation",
"single": "Single",
"theme": "Theme",
"thumbnailList": "Thumbnail list",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment