Skip to content

feat: add TalkBack/screen-reader accessibility to WhiteDNS#41

Merged
iampedii merged 19 commits into
WhiteDNS:mainfrom
Danialsamadi:accessibility-improvements
May 18, 2026
Merged

feat: add TalkBack/screen-reader accessibility to WhiteDNS#41
iampedii merged 19 commits into
WhiteDNS:mainfrom
Danialsamadi:accessibility-improvements

Conversation

@Danialsamadi

Copy link
Copy Markdown
Contributor

Overview

This PR adds comprehensive TalkBack/screen-reader accessibility support to WhiteDNS. The implementation follows Android accessibility best practices by adding semantic content descriptions to all interactive UI elements, enabling users with visual impairments to navigate and operate the application effectively.

Technical Approach

We use the idiomatic Compose pattern for accessibility: Modifier.semantics { contentDescription = ... } applied directly to clickable containers. TalkBack reads the semantics node of the focused container, making this the correct and reliable approach for content description assignment.

Changes

String Resources

  • Added 20 new content description strings to app/src/main/res/values/strings.xml
  • Added corresponding Persian (Farsi) translations to app/src/main/res/values-fa/strings.xml
  • Supports both static labels and parameterized strings for dynamic content (e.g., slider state, item counts)

UI Implementation

  • Applied semantics modifiers to 17 interactive Compose elements in WhiteDnsScreen.kt:
    • Bottom navigation tabs with localized tab names
    • Profile tab switch with selected/unselected state indication
    • Parallel test configuration expand/collapse toggle
    • Stats cards with value-level detail descriptions
    • Log action buttons and section headers
    • Toggle rows with state-aware descriptions
    • Worker count slider with numeric state
    • External link indicators (Telegram community)
    • Profile selection cards
    • VPN and battery permission request boxes
    • App logo and menu button

Bug Fixes

  • Replaced vague scanner icon content description ("Scanner info") with contextually appropriate message indicating auto-save status

Testing

Verification steps with TalkBack enabled:

  1. Tap navigation tabs and confirm screen reader announces correct tab names
  2. Toggle configuration options and confirm state descriptions are read
  3. Interact with dialogs and confirm all buttons are labeled
  4. Switch device language to Persian and confirm translations display correctly

Scope

This change is purely accessibility-focused with no modifications to feature behavior or UI structure. All changes are in-place within existing composable functions without refactoring or component extraction. The implementation is forward-compatible with planned in-app language switching features.

Compatibility

  • Supports Android API 21+
  • Tested with TalkBack screen reader
  • No impact on existing functionality

@iampedii

Copy link
Copy Markdown
Collaborator

Hi Dani,

This is a really valuable change. I really appreciate the effort you’ve put into improving accessibility and making the app more usable for people with disabilities. Great work getting this done.

@iampedii iampedii merged commit c0c0fa2 into WhiteDNS:main May 18, 2026
1 check passed
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.

2 participants