Fix FAB accessibility issue with TalkBack#20401
Open
Mahakbajpai wants to merge 2 commits intoankidroid:mainfrom
Open
Fix FAB accessibility issue with TalkBack#20401Mahakbajpai wants to merge 2 commits intoankidroid:mainfrom
Mahakbajpai wants to merge 2 commits intoankidroid:mainfrom
Conversation
Author
|
@criticalAY sir I created a PR. Please review it. |
|
Hi @Mahakbajpai, this is not a review. It looks like you have added the fix on top of another fixes you made. The commits Also, I have made the fix for this issue in my PR #20334. So I tried checking out your solution and I think you should announce the state change of the menu. By this I mean after the FAB is opened talkback should announce something which acknowledges user that something has changed on the screen and my focus is now pointing to something else. |
Added AccessibilityDelegateCompat to DeckPickerFloatingActionMenu to correctly handle TalkBack ACTION_CLICK events.
e4156ca to
dd9ba8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose / Description
Fixed an accessibility bug where the "Add FAB" functionality does not work when TalkBack is enabled. The FloatingActionButton was receiving focus but not handling the
ACTION_CLICKevent properly for TalkBack users, and it was also failing to announce its state changes (menu opened/menu closed) to visually impaired users.Fixes
[Accessibility] Add FAB doesn't work when talkback is enabled #20379
Approach
AccessibilityDelegateCompatto DeckPickerFloatingActionMenu to explicitly handle TalkBackACTION_CLICKevents on thefabMainbutton.announceForAccessibilitycalls (using explicit localized string resourcesfab_menu_openedandfab_menu_closedin02-strings.xml) to explicitly tell TalkBack users when the FAB menu opens and closes.How Has This Been Tested?
Tested manually with TalkBack enabled.
Ran
testPlayDebugUnitTestlocally without regressions.Learning (optional, can help others)
AccessibilityDelegateCompatto pass an explicitACTION_CLICKwhen relying on custom touch handlers.announceForAccessibilityto ensure screen-reader users understand what visual changes just took place on-screen.Checklist
Please, go through these checks before submitting the PR.