-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
bugSomething isn't working.Something isn't working.
Description
Describe the bug
The tabs can be selected with arrow-keys and enter of space. When you use space however, the default browser behaviour to scroll down (like a page down) is also executed, scrolling away from the tabs.
How to reproduce
- Go to https://hds.hel.fi/components/tabs/code/
tabto a tab-component- Use arrow-key to move to a different tab and press
spaceto select it - Note that using
entershows the expected behaviour
Expected behavior
The browser should not scroll down when using space
Possible solution
Prevent the default behaviour with using event.preventDefault() on the click-handler of the space key in the component
Device information
Desktop (please complete the following information):
- OS: MacOSX Sequoia 15.1
- Browser: Chrome
- Version: latest (142.0.7444.60)
Smartphone (please complete the following information):
Not relevant (no keyboard)
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working.Something isn't working.