Skip to content

Commit

Permalink
feat(project): add aria properties to header
Browse files Browse the repository at this point in the history
  • Loading branch information
RCVZ committed Apr 30, 2021
1 parent 088254f commit df53f63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ const Header: React.FC<Props> = ({ headerType = 'static', openSideBar }) => {
<div
className={styles.menu}
onClick={(sideBarOpen) => openSideBar(!sideBarOpen)}
aria-label="open menu"
role="button"
>
<Menu />
</div>
<Logo src="https://cdn.jwplayer.com/images/HXyBCU5N.png" />
<nav className={styles.nav}>
<nav className={styles.nav} aria-label="menu">
<ButtonLink label="Home" to="/" />
{/* mock */}
<ButtonLink label="Playlist" to="/p/:id" />
Expand Down
5 changes: 5 additions & 0 deletions src/components/Header/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ exports[`<Header /> renders header 1`] = `
class="container"
>
<div
aria-label="open menu"
class="menu"
role="button"
>
<svg
aria-hidden="true"
class="icon"
focusable="false"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
Expand All @@ -37,6 +41,7 @@ exports[`<Header /> renders header 1`] = `
/>
</div>
<nav
aria-label="menu"
class="nav"
>
<a
Expand Down

0 comments on commit df53f63

Please sign in to comment.