Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class Dropdown extends React.Component {
src={ LanguageIcon } />
{/* Commented out until media breakpoints are in place
<span>{ items[0].title }</span> */}
<i className="dropdown__arrow" />
<i aria-hidden="true" className="dropdown__arrow" />

<div className={ `dropdown__list ${activeMod}` }>
<ul>
Expand Down
12 changes: 7 additions & 5 deletions src/components/Navigation/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class Navigation extends React.Component {
}) }
</nav>

<div className="navigation__search">
<div role="search" className="navigation__search">
<input
aria-label="Search documentation"
type="search"
Expand All @@ -57,15 +57,17 @@ export default class Navigation extends React.Component {
<Link
className="navigation__icon"
title="GitHub Repository"
aria-label="GitHub Repository"
to="//github.com/webpack/webpack">
<i className="sidecar__icon icon-github" />
<i aria-hidden="true" className="sidecar__icon icon-github" />
</Link>

<Link
className="navigation__icon"
title="See Questions on Stack Overflow"
aria-label="See Questions on Stack Overflow"
to="//stackoverflow.com/questions/tagged/webpack">
<i className="sidecar__icon icon-stack-overflow" />
<i aria-hidden="true" className="sidecar__icon icon-stack-overflow" />
</Link>

<Dropdown
Expand All @@ -78,7 +80,7 @@ export default class Navigation extends React.Component {

{ Links.filter(link => this._isActive(link) && link.children).map(link => (
<div className="navigation__bottom" key={ link.title }>
<Container className="navigation__inner">
<nav className="container navigation__inner">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason of this change?

Copy link
Contributor Author

@tryzniak tryzniak Jun 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this one. So when using a screenreader there is a way to quickly jump between navigations. By using <nav></nav> we add a navigation landmark.

{
link.children.map(child => {
let activeMod = this._isActive(child) ? 'navigation__child--active' : '';
Expand All @@ -93,7 +95,7 @@ export default class Navigation extends React.Component {
);
})
}
</Container>
</nav>
</div>
)) }
</header>
Expand Down