Skip to content

Commit

Permalink
Remove up/down keybinding from tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
querkmachine committed Jul 19, 2024
1 parent f1f6c6d commit eb9366c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/govuk-frontend/src/govuk/components/tabs/tabs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -365,26 +365,22 @@ export class Tabs extends GOVUKFrontendComponent {
/**
* Handle tab keydown event
*
* - Press right/down arrow for next tab
* - Press left/up arrow for previous tab
* - Press right arrow for next tab
* - Press left arrow for previous tab
*
* @private
* @param {KeyboardEvent} event - Keydown event
*/
onTabKeydown(event) {
switch (event.key) {
// 'Left', 'Right', 'Up' and 'Down' required for Edge 16 support.
// 'Left' and 'Right' required for Edge 16 support.
case 'ArrowLeft':
case 'ArrowUp':
case 'Left':
case 'Up':
this.activatePreviousTab()
event.preventDefault()
break
case 'ArrowRight':
case 'ArrowDown':
case 'Right':
case 'Down':
this.activateNextTab()
event.preventDefault()
break
Expand Down

0 comments on commit eb9366c

Please sign in to comment.