diff --git a/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap b/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap index 5a5f359527..83a101782c 100644 --- a/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/TopcoderHeader/__snapshots__/index.jsx.snap @@ -33,6 +33,7 @@ exports[`Default render 1`] = ` onTouchStart={[Function]} > @@ -47,6 +48,7 @@ exports[`Default render 1`] = ` onTouchStart={[Function]} > Tracks @@ -60,6 +62,7 @@ exports[`Default render 1`] = ` onTouchStart={[Function]} > @@ -312,6 +315,7 @@ exports[`Render with open menu 1`] = ` onTouchStart={[Function]} > @@ -326,6 +330,7 @@ exports[`Render with open menu 1`] = ` onTouchStart={[Function]} > Tracks @@ -339,6 +344,7 @@ exports[`Render with open menu 1`] = ` onTouchStart={[Function]} > @@ -602,6 +608,7 @@ exports[`Render with specified profile 1`] = ` onTouchStart={[Function]} > @@ -616,6 +623,7 @@ exports[`Render with specified profile 1`] = ` onTouchStart={[Function]} > Tracks @@ -629,6 +637,7 @@ exports[`Render with specified profile 1`] = ` onTouchStart={[Function]} > diff --git a/src/shared/components/TopcoderHeader/index.jsx b/src/shared/components/TopcoderHeader/index.jsx index 6f5e6eb523..43acaa3970 100644 --- a/src/shared/components/TopcoderHeader/index.jsx +++ b/src/shared/components/TopcoderHeader/index.jsx @@ -219,6 +219,15 @@ export default class TopcoderHeader extends React.Component { let styleName = 'main-menu-item'; if (openedMenu && openedMenu.title === item.title) styleName += ' opened'; if (item.title === currentNav.menuTitle) styleName += ' current'; + const onMainMenuKeyDown = (event) => { + if (event.key === 'ArrowDown') { + event.preventDefault(); + openMenu(item, event.target); + } else if (event.key === 'ArrowUp') { + event.preventDefault(); + closeMenu(); + } + }; return (
  • {item.url ? ( - + {item.title} - ) : {item.title}} + ) : {item.title}}
  • ); });