Skip to content

PM-29870: Add explicit traversal order for scaffold#6580

Merged
david-livefront merged 1 commit intomainfrom
PM-29870-scaffold-traversal-order
Feb 25, 2026
Merged

PM-29870: Add explicit traversal order for scaffold#6580
david-livefront merged 1 commit intomainfrom
PM-29870-scaffold-traversal-order

Conversation

@david-livefront
Copy link
Collaborator

@david-livefront david-livefront commented Feb 25, 2026

🎟️ Tracking

PM-29870

📔 Objective

This PR updates the traversal order inside of the BitwardenScaffold to ensure that it always navigate correctly when TalkBack is on. Previously it would navigate in awkward ways because of the custom layouts inside.

📸 Screenshots

Screen_recording_20260225_112941.mp4

@david-livefront david-livefront requested a review from a team as a code owner February 25, 2026 15:23
@david-livefront david-livefront added app:password-manager Bitwarden Password Manager app context app:authenticator Bitwarden Authenticator app context ai-review Request a Claude code review t:bug Change Type - Bug labels Feb 25, 2026
@github-actions github-actions bot removed the t:bug Change Type - Bug label Feb 25, 2026
@claude
Copy link
Contributor

claude bot commented Feb 25, 2026

Claude finished @david-livefront's task in 2m 21s —— View job


Review Summary

PR: PM-29870 - Add explicit traversal order for scaffold

Verdict: Clean PR -- no issues found.

This PR adds explicit accessibility traversal ordering to BitwardenScaffold to fix TalkBack navigation on screens using the scaffold. The approach is correct and well-structured.

What was reviewed

  • /ui/src/main/kotlin/com/bitwarden/ui/platform/components/scaffold/BitwardenScaffold.kt (+78/-18)

Analysis

Approach: Each scaffold section (top bar, content, snackbar host, FAB, bottom bar) is wrapped with semantics { isTraversalGroup = true; traversalIndex = ... } to establish a deterministic TalkBack focus order. Named constants define the traversal indices, making the intended ordering clear and maintainable.

Traversal order established:

  1. Top app bar (0)
  2. Content area (1) -- within which main content (0) precedes navigation rail (1)
  3. Snackbar (2)
  4. FAB (3)
  5. Bottom app bar (4)

Refactoring: The inline consumeWindowInsets logic for the main content Box was cleanly extracted into a consumeWindowInsetsForMainContent extension function, improving readability with no behavioral change.

Observations:

  • The wrapping Box composables for topBar, snackbarHost, and floatingActionButton are correctly sized to their content and should not affect layout
  • The modifier parameter threading for ScaffoldBottomAppBar and ScaffoldNavigationRail correctly applies semantics at the outermost container level
  • The content-first traversal order within the content group (main content before navigation rail) is a valid accessibility pattern that reduces repetitive navigation for screen reader users
  • No test changes are included, which is reasonable since traversal ordering is a UI behavior best verified through manual TalkBack testing

@david-livefront david-livefront added the t:bug Change Type - Bug label Feb 25, 2026
@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailsb648248f-c485-4701-92fa-59e3e2edd9dd

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.44%. Comparing base (d51d6c7) to head (8b7786b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6580   +/-   ##
=======================================
  Coverage   86.44%   86.44%           
=======================================
  Files         786      786           
  Lines       56768    56768           
  Branches     8253     8253           
=======================================
  Hits        49073    49073           
  Misses       4832     4832           
  Partials     2863     2863           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@david-livefront
Copy link
Collaborator Author

Thanks @SaintPatrck

@david-livefront david-livefront added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 64a79ff Feb 25, 2026
23 of 24 checks passed
@david-livefront david-livefront deleted the PM-29870-scaffold-traversal-order branch February 25, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants