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

Full keyboard-navigation groundwork: update Clipboard internals logic #1256

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manuhabitela
Copy link
Collaborator

Creating this now to follow ongoing work on https://github.com/orgs/gristlabs/projects/1/views/1?pane=issue&itemId=82452113&issue=gristlabs%7Cgrist-core%7C1251. Will update when this is ready.

@manuhabitela manuhabitela force-pushed the issue-1251-keyboard-navigation branch 3 times, most recently from 38a916d to b432a9d Compare October 14, 2024 14:36
Until this commit, the Clipboard implementation relied on an
always-focused hidden textarea element. This had a few benefits:
- makes it easy to handle the "input" command,
- prevents browser-quirks about copy/paste events.

The downside were:
- it makes it hard to handle usual browser keyboard navigation (with
tab, arrow keys, etc.). For now, this default navigation is overriden
anyway with app-specific shortcuts so we don't care much. But it makes
future improvements about that difficult.
- it makes screen reader support difficult. As basically any interaction
focuses back to one dummy element, this is an actual barrier to any
future work on this.

In modern day browser APIs, the copy/paste quirks are not there anymore,
so the need to go around them is no more.
(actually, not 100% sure yet, I'm testing this more now)

This commit starts some ground work to stop relying on an hidden input,
making it possible then to work on more complete keyboard navigation,
and eventually actual screen reader support.

This still doesn't work really great, there are a few @todo marked in
the comments.
@manuhabitela manuhabitela force-pushed the issue-1251-keyboard-navigation branch from b432a9d to 0c2586a Compare October 14, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant