Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify keyboard focus separately from Screen Reader focus #34737

Open
aliossam opened this issue Sep 20, 2022 · 5 comments
Open

Specify keyboard focus separately from Screen Reader focus #34737

aliossam opened this issue Sep 20, 2022 · 5 comments
Labels
API: Keyboard Needs: Triage 🔍 Never gets stale Prevent those issues and PRs from getting stale

Comments

@aliossam
Copy link

Description

On Android keyboard focus and accessibility focus are handled separately at the system level. Often these match, as many accessibility services use the “focusable” property (which informs keyboard focus), to also inform them where to focus. In API 28 however, Android added the setScreenReaderFocusable property to View (https://developer.android.com/reference/android/view/View#setScreenReaderFocusable(boolean)) which allows you to flag a view as being focusable only for screen readers, without making that same view focusable by keyboards.

This is useful since screen readers often want to focus on views that are content only, but not actionable (so their users can hear the content), but focusing on these content elements is not useful for keyboard navigation users, who only need to be able to move between interactive elements.

Right now in React Native, the accessible prop maps to focusable on Android, making the element focusable by both screen readers and keyboard users.

There are a few different approaches we could take here. We could surface a new prop called screenReaderFocusable, that sets focusable to false but screenReaderFocusable to true, we could adjust the accessible prop to only set screenReaderFocusable to true, and add a new prop for keyboardFocusable which sets focusable to true, or we could have the accessible prop contextually set either focusable (if the element is interactive by having a click handler) or screenreaderFocusable (if it’s content only).

Version

0.66

Output of npx react-native info

see description

Steps to reproduce

see description

Snack, code example, screenshot, or link to a repository

see description

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 20, 2023
@lindboe
Copy link
Contributor

lindboe commented Mar 20, 2023

This is still relevant! Keyboard navigation (or TV remote navigation) users have different needs than screen-reader users.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 21, 2023
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 27, 2023
@frankcalise
Copy link
Collaborator

Still relevant, please keep open

@cortinico cortinico added Never gets stale Prevent those issues and PRs from getting stale and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Oct 2, 2023
@trcoffman
Copy link

Yeah this would be awesome to get resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Keyboard Needs: Triage 🔍 Never gets stale Prevent those issues and PRs from getting stale
Projects
None yet
Development

No branches or pull requests

6 participants