Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7099ff7a authored by Alex Shabalin's avatar Alex Shabalin
Browse files

Prevent automatic Talkback "Detected text" announcement.

That announcement was pronounced because the focusable element
`id/device_container` had all its visible elements `id/title`
and `id/title_icon` marked with `importantForAccessibility=no`, so the
Talkback fell back to it's AI features to describe the element content.

1. Removed `importantForAccessibility="no"` by default from the title
element.
2. Set `focusable="true"` for the device container and
`focusable="false"` for title and subtitle to make screen reader
announce the device container as one entity as per
https://developer.android.com/guide/topics/ui/accessibility/principles#content-groups
3. When the seekbar is visible hide the rest of the content from the
accessibility tree with `updateContainerContentA11yImportance` method.

Flag: EXEMPT bugfix
Bug: b/374862206
Fix: b/374862206
Test: atest SystemUiRoboTests:MediaOutputAdapterLegacyTest,
    accessibility with Talkback.
Change-Id: Ifb3613af91ffb71e901e45903328b245e2a4b414
parent ca8ecbeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment