Skip to content

fix(appbar): make a pressable Appbar.Content title a single focus stop - #5270

Open
aby050 wants to merge 1 commit into
callstack:mainfrom
aby050:fix/appbar-content-single-focus-stop
Open

aby050 wants to merge 1 commit into
callstack:mainfrom
aby050:fix/appbar-content-single-focus-stop

Conversation

@aby050

@aby050 aby050 commented Nov 20, 2026

Copy link
Copy Markdown

Motivation

With onPress, Appbar.Content is two focus stops on Android: the Pressable (with the focus ring) and the title Text inside it, which is accessible on its own. TalkBack reads the title twice, and Shift+Tab with a hardware keyboard stops twice.

The Pressable already exposes the title as its label, so the inner Text is now accessible only when there is no onPress. A static title is unchanged: it stays an accessible heading.

Related issue

Fixes #5252

Screenshots / Videos

No visual change.

Test plan

  • Added two tests in Appbar.test.tsx:
    • A pressable title is one button named "Title", and its Text is not accessible. This test fails without the change.
    • A static title is still a heading.
  • jest src/components/__tests__/Appbar (83 passed), yarn typecheck and eslint pass.
  • Manual check for reviewers: on an Android emulator, render <Appbar.Content title="Title" onPress={() => {}} /> and move through it with TalkBack or Tab / Shift+Tab. It should be a single stop that reads "Title, button". I haven't run this on a device myself.

With onPress, the title Text stayed accessible inside the Pressable, so
Android (TalkBack and hardware keyboard) stopped on it twice. The
Pressable already reads the title, so the inner Text is now accessible
only when there is no onPress.

Fixes callstack#5252
@github-actions

Copy link
Copy Markdown

Found potential problems with the pull request:

  • The description is too long. Please keep it under 1000 characters.
  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

This branch has not been deployed

No deployments
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.

Appbar.Content: a pressable title is two focus stops on Android

1 participant