jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customization and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
129 stars 90 forks source link

Overlay with long content does not accept keyboard navigation by default #4308

Open luptonn opened 2 days ago

luptonn commented 2 days ago

Latest version

Description

When showing long content Overlay does not allow user to TAB into the scrollable content to scroll with the keyboard. This can be rectified by setting a tabIndex on OverlayPanelContent.

Steps to reproduce

https://salt-template-yxnzmn.stackblitz.io

Expected behavior

Automatically enable tab into content when content becomes scrollable

Package name(s)

Core (@salt-ds/core)

Package version(s)

1.37.0

Browser

Operating system

Are you a JPMorgan Chase & Co. employee?

joshwooding commented 2 days ago

This will be fixed in newer browsers as this is being added there:

https://developer.chrome.com/blog/keyboard-focusable-scrollers

@jake-costa we should decide if we provide an automatic fix or add guidance.

jake-costa commented 2 days ago

@joshwooding I believe we should address this. (e.g. tabindex="0", role="region" and ensure it has a accessible name via either aria-label or aria-labelledby targeting the ID of the visible heading) Though the naming might be more appropriate as pattern guidance. Let me know if you want to discuss.