fix(DeckPicker): improve accessibility of DeckPicker FAB#20334
Open
KT-1114 wants to merge 1 commit intoankidroid:mainfrom
Open
fix(DeckPicker): improve accessibility of DeckPicker FAB#20334KT-1114 wants to merge 1 commit intoankidroid:mainfrom
KT-1114 wants to merge 1 commit intoankidroid:mainfrom
Conversation
Contributor
|
Important Maintainers: This PR contains Strings changes
|
Contributor
|
Not a review,but I observed that the isFABOpen flag in closeFloatingActionMenu |
Author
|
Nice catch @Fandroid745! I have removed the redundant assignment in the latest commit. Lesson learnt. Thanks a lot. |
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
This PR improves the accessibility of the Floating Action Menu on the Deck Picker Screen. At present, when the TalkBack is enabled, the Floating Action Menu Button (FAB) does not toggle properly as the FAB is not supported by the accessibility services and also due to focus management issues. This locks out the user from getting shared decks, creating decks and filtered decks the normal way.
Related
Approach
Dynamic State Management: Implemented
updateAccessibilityState()which usesViewCompat.replaceAccessibilityActionto update theACTION_CLICKlabel based on the state of FAB menu. It ensures that TalkBack announces the options correctly.Focus Management: Used
.postto set the focus and send aTYPE_VIEW_FOCUSEDevent to the first menu item (addNoteLabel) when the menu is opened. This ensures that the user gets acknowledgement of the state change.How Has This Been Tested?
Screen_Recording_20260218_132417_AnkiDroid.hevc.mp4
To test the changes you can follow the following steps:
This test was conducted on a physical device (Samsung Galaxy A54, API 36) .
Learning (can help others)
I read about Making custom views more accessible
and learnt about mimicking the accessibility reader service when using a work around like the FAB menu.
Checklist
Note
The Google Accessibility Scanner stills shows that the FAB button is unsupported as this solution uses a work around.