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

Focus issues #30

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Focus issues #30

merged 2 commits into from
Nov 21, 2024

Conversation

JayPanoz
Copy link
Contributor

Re #29 but partially addresses it, more has to be done on Actions branch given the extent of the Setting component refactoring.

This should already help with most issues, inspired from the React Aria Components’ own styles so that should be OK, a11y-wise.

  • Switched to React Aria data-attributes to style focus instead of vanilla-CSS pseudo-classes, especially as focus seems to be handled programmatically.
  • Disables focus on non-keyboard interactions
  • When focus is not visible, immersive mode should behave normally.

That was tested on a large amount of actual devices using BrowserStack but of course that doesn’t mean you may encounter issues.

Known edge cases:

  • When focus is visible e.g. using the Escape Key or clicking the close button using Enter/Space Keys, the focus ring will be visible in immersive mode. First click will dismiss it, second will toggle immersive. It’s not necessarily a rare occurrence as one might use a mouse to click actions and menus, and Escape to close them – some sort of hybrid use.

There’s no simple/trivial solution to this given how complex focus management becomes at this point, with multiple factors to take into account, so it will be preferable to address this in Actions – with this PR merged into it.

@JayPanoz JayPanoz merged commit 22cc41d into develop Nov 21, 2024
1 check passed
@JayPanoz JayPanoz deleted the focus-issues branch November 21, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant