Skip to content

Conversation

@Chiraggupta0
Copy link

@Chiraggupta0 Chiraggupta0 commented Jan 16, 2026

Purpose / Description

This PR fixes an accessibility issue on the Home screen when the collection is empty.

The Add Deck FloatingActionButton did not have a content description, causing TalkBack and other screen readers to announce it as “Unlabelled”. This makes it difficult for users relying on assistive technologies to understand the purpose of the control.

Fixes

Approach

Adds a localized contentDescription to the Add Deck FAB
Introduces a new string resource (add_deck) for proper accessibility support
No visual or behavioral changes for sighted users

How Has This Been Tested?

Ran the app locally on an emulator
Verified the layout change
Confirmed using Accessibility Scanner that the FAB is now properly labeled

Test Video

ankidroid.issue.20110.mp4

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@github-actions
Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@Chiraggupta0
Copy link
Author

@david-allison Thanks for taking a look when you have time.
Please let me know if any changes or improvements are needed.

@david-allison
Copy link
Member

@Chiraggupta0 no need to ping, thanks for the PR, I'll get around to it when I have time

Typically: give people 48 hours to respond, 24 is fine for me

@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "disabled"
Copy link
Member

Choose a reason for hiding this comment

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

What does this do? Why was it added?

android:layout_margin="16dp"
android:layout_marginBottom="40dp"
android:src="@drawable/ic_add_white" />
android:src="@drawable/ic_add_white"
Copy link
Member

Choose a reason for hiding this comment

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

How did you test the before/after? This doesn't appear to be the correct file.

<string name="app_not_initialized_new">AnkiDroid is not initialized yet. Please open AnkiDroid and try again</string>

<!-- Deck Creation -->
<string name="add_deck">Add deck</string>
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: Missing labels on Home Screen ("Collection is empty") and other fixes

2 participants