Skip to content

Name the reading control actions in the reading control hints - #130

Merged
trypsynth merged 1 commit into
trypsynth:masterfrom
aaron-gh:reading-control-hint
Oct 10, 2026
Merged

trypsynth merged 1 commit into
trypsynth:masterfrom
aaron-gh:reading-control-hint

Conversation

@aaron-gh

@aaron-gh aaron-gh commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Needs #123, whose GestureHints this uses; it contains that PR's commits until it's merged.

The hints for reading controls such as Brightness or Speech rate said "swipe up or swipe down to adjust the setting" when you selected one, and "swipe up with 3 fingers or swipe down with 3 fingers to select a different setting" after you changed it. So after a change, the hint said how to leave the reading control rather than how to change it, and neither said what "the setting" was. Once any hint for adjusting a reading control had been spoken, such as "swipe up or swipe down to read by characters", the second hint named the adjust gestures instead: "swipe up or swipe down to select a different setting". getAdjustSelectedSettingGestureNames saved its gestures in cachedSelectSettingGestureNames, the select gestures' cache.

Both hints now name the actions with their gestures, using the action titles from the gesture settings, which are already translated: "Move reading control up or backward: Swipe up" and "Move reading control down or forward: Swipe down", on selecting and after changing a reading control. "No action available" on the Actions reading control, and "Spoken language unavailable while using a voice profile", name "Previous reading control" and "Next reading control" with their gestures. An action with no gesture names Backtalk settings > Gestures. The select gestures' cache, no longer used, is removed.

Limitations

The hint doesn't name the reading control.

Testing

On an Android 16 emulator:

  • Selecting Wrap around says "Wrap around", then "Move reading control up or backward: Swipe up" and "Move reading control down or forward: Swipe down". Changing it ("Wrap around off", "Wrap around on") gives the same two lines.
  • "swipe up or swipe down to read by characters" is unchanged.

@trypsynth trypsynth left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. The hints now name the gestures the user actually has, through the same lookup the gesture settings use, so RTL, watch defaults, other gesture sets and unassigned gestures all come out right. Thanks for fixing the cache that getAdjustSelectedSettingGestureNames wrote into, too.

This stacks on #123, so it can only merge after that one. A few small things for the reading control commit:

  • Conflict with master. 29d6f13 ("Say the value when a reading control is at its limit") changed the same announcements for volume, brightness and both focus delays, and added the @StringRes import. When rebasing, keep the atLimit(...) text along with the new hint.
  • Line separator. The two action lines are joined with "\n". CompositorUtils.getSeparator() would match how the screen search hint joins its lines.
  • Line length. One line around SelectorController.java:2207 is 107 characters, over the 100 limit.
  • Optional: actionLines could move into GestureHints, which would keep more of this out of Google's file.

Also worth knowing, not for this PR: the granularity and spell check hints still say "swipe up or swipe down to read by…" in the old style, so the two kinds of hint sound a bit different now.

@aaron-gh
aaron-gh force-pushed the reading-control-hint branch from d75ac74 to 64130a9 Compare October 9, 2026 15:59
aaron-gh added a commit to aaron-gh/backtalk that referenced this pull request Oct 9, 2026
@trypsynth

Copy link
Copy Markdown
Owner

Can you rebase now please?

The hints for reading controls such as Brightness or Speech rate said
"swipe up or swipe down to adjust the setting" on selecting one, and
"swipe up with 3 fingers or swipe down with 3 fingers to select a
different setting" after changing it, so after a change the hint said
how to leave the reading control rather than how to change it. Once any
hint for adjusting a reading control had been spoken, the second hint
named the adjust gestures instead, as "swipe up or swipe down to select
a different setting", because both used the same cache.

Both hints now name the actions and their gestures, with the action
titles from the gesture settings, which are translated:
"Move reading control up or backward: Swipe up" and "Move reading
control down or forward: Swipe down", on selecting and after changing a
reading control. "No action available" on the Actions reading control,
and "Spoken language unavailable while using a voice profile", name
"Previous reading control" and "Next reading control" with their
gestures. An action with no gesture names Backtalk settings > Gestures.

Limitations: the hint doesn't name the reading control.
@aaron-gh
aaron-gh force-pushed the reading-control-hint branch from 64130a9 to c437295 Compare October 10, 2026 13:08
@trypsynth
trypsynth merged commit c32bda2 into trypsynth:master Oct 10, 2026
1 check passed
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