Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(masthead): add aria-hidden to overflow nav carets #4489

Merged
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
26 changes: 26 additions & 0 deletions packages/react/src/__tests__/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -32606,6 +32606,7 @@ exports[`Storyshots Components|Dotcom Shell Default (footer language only) 1`] =
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -32639,6 +32640,7 @@ exports[`Storyshots Components|Dotcom Shell Default (footer language only) 1`] =
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -39420,6 +39422,7 @@ exports[`Storyshots Components|Dotcom Shell Default 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -39453,6 +39456,7 @@ exports[`Storyshots Components|Dotcom Shell Default 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -45083,6 +45087,7 @@ exports[`Storyshots Components|Dotcom Shell Search open 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -45116,6 +45121,7 @@ exports[`Storyshots Components|Dotcom Shell Search open 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -53905,6 +53911,7 @@ exports[`Storyshots Components|Dotcom Shell With L1 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -53938,6 +53945,7 @@ exports[`Storyshots Components|Dotcom Shell With L1 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -59629,6 +59637,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer (language only) 1`
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -59662,6 +59671,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer (language only) 1`
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -65487,6 +65497,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -65520,6 +65531,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -71076,6 +71088,7 @@ exports[`Storyshots Components|Dotcom Shell With platform 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -71109,6 +71122,7 @@ exports[`Storyshots Components|Dotcom Shell With platform 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -77032,6 +77046,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer (language only) 1`
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -77065,6 +77080,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer (language only) 1`
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -83912,6 +83928,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -83945,6 +83962,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -103432,6 +103450,7 @@ exports[`Storyshots Components|Masthead Default 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -103465,6 +103484,7 @@ exports[`Storyshots Components|Masthead Default 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -103916,6 +103936,7 @@ exports[`Storyshots Components|Masthead Search open by default 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -103949,6 +103970,7 @@ exports[`Storyshots Components|Masthead Search open by default 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -107328,6 +107350,7 @@ exports[`Storyshots Components|Masthead With L 1 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -107361,6 +107384,7 @@ exports[`Storyshots Components|Masthead With L 1 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down Expand Up @@ -107675,6 +107699,7 @@ exports[`Storyshots Components|Masthead With Platform 1`] = `
</HeaderNavigation>
</div>
<button
aria-hidden="true"
aria-label="Masthead left caret"
className="bx--header__nav-caret-left"
hidden={true}
Expand Down Expand Up @@ -107708,6 +107733,7 @@ exports[`Storyshots Components|Masthead With Platform 1`] = `
</ForwardRef(CaretLeft20)>
</button>
<button
aria-hidden="true"
aria-label="Masthead right caret"
className="bx--header__nav-caret-right"
hidden={true}
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/components/Masthead/HeaderNavContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ const HeaderNavContainer = ({ children }) => {
onClick={paginateLeft}
ref={caretLeftRef}
tabIndex="-1"
aria-hidden="true"
hidden>
<CaretLeft20 />
</button>
Expand All @@ -204,6 +205,7 @@ const HeaderNavContainer = ({ children }) => {
onClick={paginateRight}
ref={caretRightRef}
tabIndex="-1"
aria-hidden="true"
hidden>
<CaretRight20 />
</button>
Expand Down