Skip to content

Conversation

@oleksandr-danylchenko
Copy link
Contributor

Relations

Issue

When the TextAnnotatorPopup appears during the keyboard selection, the focus isn't immediately shifted to it (reason). Instead, a user should explicitly Tab to enter into it.
However, there's no way to know when or whether the popup appeared for the screen reader users.

Suggestion

A navigation hint message should be explicitly announced using the live area. The message should appear after a user idles for at least 700ms to prevent it from being interrupted by system announcements. The hint should be announced once per selection so as not to be too annoying.

Changes Made

  1. Added @react-aria/live-announcer dependency (source), that allows to announce arbitrary messages on the page conveniently.
  2. Added listeners for the user's idling that triggers the announcement.
  3. Made the message configurable.

Relations

This PR depends on the Keyboard Selection Support one - #118. Therefore, it includes all of its changes within.

@oleksandr-danylchenko oleksandr-danylchenko force-pushed the keyboard-selection-announcement branch from 2c1a1da to 1b6c1fe Compare August 22, 2024 16:11
@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as draft August 22, 2024 16:16
@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as ready for review August 22, 2024 17:35
…ncement

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
#	packages/text-annotator-react/src/hooks/index.ts
…ncement

# Conflicts:
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
…ncement

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
…ncement

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
…ncement

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
…ncement

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as draft October 7, 2024 15:45
@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as ready for review October 7, 2024 15:47
# Conflicts:
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx
# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
#	packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx
@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as draft December 3, 2024 09:50
@oleksandr-danylchenko
Copy link
Contributor Author

I discovered that enabling this hook on the popup breaks the Mac's "Look up %word%" feature:

look_up_broken.mp4

# Conflicts:
#	package-lock.json
#	packages/text-annotator-react/package.json
@rsimon
Copy link
Member

rsimon commented Oct 13, 2025

Hi @oleksandr-danylchenko, I notice this PR is still in draft. What's the status on this? Is this work still ongoing?

@oleksandr-danylchenko
Copy link
Contributor Author

@rsimon, I'd say that this is a PR in a limbo state of "things we'd like to have, but don't care enough to prioritize them yet". Although if it's smth that would be important for you, I believe that I can negotiate bringing the task higher.

@rsimon
Copy link
Member

rsimon commented Oct 13, 2025

Got it, thanks. Not essential for us right now either. Let's leave it open as-is, then.

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.

2 participants