Skip to content

Commit

Permalink
Fix: Add 'Maximize sidebar' aria-label (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW committed Feb 11, 2021
1 parent 5724995 commit 4e14352
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/app/views/app-sections/AppTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ export function appTitleDisplayOnFullScreen(

return <div style={{ display: 'flex', width: '100%' }}>
<TooltipHost
content='Minimize sidebar'
content={!minimised ? 'Minimize sidebar' : 'Maximize sidebar'}
id={getId()}
calloutProps={{ gapSpace: 0 }}
tooltipProps={{
onRenderContent: function renderContent() {
return <div>
<FormattedMessage id={'Minimize sidebar'} /></div>
<FormattedMessage id={!minimised ? 'Minimize sidebar' : 'Maximize sidebar'} /></div>
}
}}>
<IconButton
iconProps={{ iconName: 'GlobalNavButton' }}
className={classes.sidebarToggle}
ariaLabel='Minimize sidebar'
ariaLabel={!minimised ? 'Minimize sidebar' : 'Maximize sidebar'}
onClick={() => toggleSidebar()} />
</TooltipHost>
<div className={classes.graphExplorerLabelContainer} role={'heading'} aria-level={1}>
<div className={classes.graphExplorerLabelContainer} role={'heading'} aria-level={1}>
{!minimised &&
<>
<Label className={classes.graphExplorerLabel}>
Expand All @@ -50,7 +50,7 @@ export function appTitleDisplayOnMobileScreen(
ariaLabel='Remove sidebar'
onClick={() => toggleSidebar()}
/>
<div style={{ padding: 10 }} role={'heading'} aria-level={1}>
<div style={{ padding: 10 }} role={'heading'} aria-level={1}>
<Label className={classes.graphExplorerLabel}>
Graph Explorer
</Label>
Expand Down
3 changes: 2 additions & 1 deletion src/messages/GE.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,6 @@
"Adaptive Cards Templating SDK": "Adaptive Cards Templating SDK",
"card": "Card",
"JSON Schema": "JSON Schema",
"Report an Issue": "Report an Issue"
"Report an Issue": "Report an Issue",
"Maximize sidebar": "Maximize sidebar"
}

0 comments on commit 4e14352

Please sign in to comment.