[PR #6986] [MERGED] [PM-38118] fix: Support Firefox updated toolbar in accessibility autofill #107239

Closed
opened 2026-06-03 13:46:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6986
Author: @aj-rosado
Created: 5/28/2026
Status: Merged
Merged: 5/29/2026
Merged by: @aj-rosado

Base: mainHead: PM-38118/fix-firefox-quick-tile-autofill


📝 Commits (5)

  • f52f039 Fix accessibility autofill for Firefox's updated toolbar structure
  • fbf85b9 Added more test coverage
  • 2ce7811 improved readibility
  • e272a30 added explanatory comment for semanticId and viewId matching
  • 77cd8da fixed formatting

📊 Changes

4 files changed (+245 additions, -34 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/model/Browser.kt (+2 -0)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/parser/AccessibilityParserImpl.kt (+26 -14)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/util/BrowserUtil.kt (+120 -20)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/parser/AccessibilityParserTest.kt (+97 -0)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-38118

📔 Objective

Firefox's toolbar now exposes the URL bar under a Compose test tag (ADDRESSBAR_URL_BOX) via testTagsAsResourceId, with the URL stored in contentDescription rather than text. The standard findAccessibilityNodeInfosByViewId API cannot locate these nodes, causing the accessibility tile to silently do nothing on affected pages.

Changes:

  • Adds possibleUrlSemanticIds to Browser for URL bar IDs that require manual tree traversal instead of the system API lookup
  • Updates all Mozilla browser entries to include ADDRESSBAR_URL_BOX in possibleUrlSemanticIds with a mozillaUrlExtractor that reads contentDescription when text is empty (toolbar format: " $url. Search or enter address")
  • AccessibilityParserImpl tries possibleUrlFieldIds via the fast system API first; falls back to possibleUrlSemanticIds tree traversal only when the standard lookup returns empty — no performance regression for non-Mozilla browsers
  • Adds unit test coverage for the semantic ID + contentDescription extraction path

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6986 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 5/28/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `main` ← **Head:** `PM-38118/fix-firefox-quick-tile-autofill` --- ### 📝 Commits (5) - [`f52f039`](https://github.com/bitwarden/android/commit/f52f039df0b1c57ffd3ccedb61483e6187270d69) Fix accessibility autofill for Firefox's updated toolbar structure - [`fbf85b9`](https://github.com/bitwarden/android/commit/fbf85b9928db786ed20f7f8eaf3b760c4ab4a065) Added more test coverage - [`2ce7811`](https://github.com/bitwarden/android/commit/2ce78119a9ac784abd0bb9424822968a75afcc00) improved readibility - [`e272a30`](https://github.com/bitwarden/android/commit/e272a30a57bd90098aaa02d6eee8050af231f728) added explanatory comment for semanticId and viewId matching - [`77cd8da`](https://github.com/bitwarden/android/commit/77cd8da427c80a46255cd54182f0e0f214af5cae) fixed formatting ### 📊 Changes **4 files changed** (+245 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/model/Browser.kt` (+2 -0) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/parser/AccessibilityParserImpl.kt` (+26 -14) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/util/BrowserUtil.kt` (+120 -20) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/autofill/accessibility/parser/AccessibilityParserTest.kt` (+97 -0) </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-38118 ## 📔 Objective Firefox's toolbar now exposes the URL bar under a Compose test tag (`ADDRESSBAR_URL_BOX`) via `testTagsAsResourceId`, with the URL stored in `contentDescription` rather than `text`. The standard `findAccessibilityNodeInfosByViewId` API cannot locate these nodes, causing the accessibility tile to silently do nothing on affected pages. Changes: - Adds `possibleUrlSemanticIds` to `Browser` for URL bar IDs that require manual tree traversal instead of the system API lookup - Updates all Mozilla browser entries to include `ADDRESSBAR_URL_BOX` in `possibleUrlSemanticIds` with a `mozillaUrlExtractor` that reads `contentDescription` when `text` is empty (toolbar format: `" $url. Search or enter address"`) - `AccessibilityParserImpl` tries `possibleUrlFieldIds` via the fast system API first; falls back to `possibleUrlSemanticIds` tree traversal only when the standard lookup returns empty — no performance regression for non-Mozilla browsers - Adds unit test coverage for the semantic ID + `contentDescription` extraction path --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-03 13:46:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#107239