Keyboard nav on Safari broken for scrolling list of checkboxes
See original GitHub issueEnvironment
Operating system
MacOS 10.15.5
Browser
Safari 13.1.1
Assistive technology used to verify
Keyboard navigation
Detailed description
What version of the Carbon Design System are you using?
10.15
What did you expect to happen?
Able to TAB
through a list of checkbox items and see currently focused item.
What happened instead?
In Safari, the list scrolling goes haywire and currently focused item is not shown.
Steps to reproduce the issue
- Load https://codesandbox.io/s/red-cookies-vmkou?file=/src/index.js in Safari
- Click on each heading and then try to
TAB
through each list - Notice that tabbing in the first two lists works fine for some of the first items, but then list scrolls excessively and the focused item is no longer shown.
- Notice that it works as expected for the 3rd list, where
position: relative
has been added to.bx--checkbox-wrapper
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Mac accessibility shortcuts - Apple Support
Choose Apple menu > System Preferences, then click Keyboard. Click Shortcuts. From the bottom of the preferences window, select the checkbox ...
Read more >How to use the keyboard to navigate on Safari - tempertemper
To turn on full keyboard navigation in Safari, go to: ... Accessibility; “Press tab to highlight each item on a webpage” checkbox.
Read more >Handling common accessibility problems - MDN Web Docs
When you are scrolling through headings, lists, etc., items you are selected on will generally be highlighted with a subtle outline, but this...
Read more >Smooth Scrolling and Accessibility | CSS-Tricks
It is important to ensure that all content can be accessed with the keyboard alone because some users 100% rely on the keyboard...
Read more >iPad Web App: Detect Virtual Keyboard Using JavaScript in ...
iOS Safari overlays the page with the keyboard (page size stays the same), and changes how scrolling works. Safari both scrolls the page...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dakahn apparently this is a “feature” on Safari, as they have a setting in Safari > Preferences > Advanced: Accessibility: [checkbox] Press tab to highlight each item on web page
If you haven’t checked it, by using Tab Safari will only highlight text and lists that can get focus. By using Option + Tab you will see the focus in all controls (buttons, checkboxes etc).
@avigil06 wrote a blog post about trying to code around this in Safari.
There is also an OS level control to change this (System Preferences > Keyboard > Shortcuts:
[radio button on bottom] Full Keyboard Access: in windows and dialogs, press Tab to move keyboard focus between:
[default option] Text boxes and lists only [option] All controls.
No idea why Mac OS and Safari are making these the default setting, but I guess that users who use Mac, Safari and want to navigate by keyboard, know this 🤷 But, I do agree with @avigil06 that these behaviours should be consistent across all browsers.
I think we’re all clear here. Something to note moving forward. Great find @sjarva! Thank you so much!