[PR #1213] [CLOSED] [iOS Accessibility] Bugfix: VoiceOver always seeing fields for all entry types #2794

Closed
opened 2025-11-26 23:24:11 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1213
Author: @eliykat
Created: 1/11/2021
Status: Closed

Base: masterHead: voiceover-reads-hidden-controls


📝 Commits (4)

  • 5597a34 make VoiceOver only read password when visible
  • 1c2c525 add/remove elements instead of using isVisible
  • e128611 Set IsInAccessibleTree prop to match IsVisible
  • 1880e9b Remove unnecessary AutomationProperties

📊 Changes

7 files changed (+881 additions, -767 deletions)

View changed files

📝 src/App/Pages/Vault/AddEditPage.xaml (+389 -370)
📝 src/App/Pages/Vault/AddEditPage.xaml.cs (+22 -0)
📝 src/App/Pages/Vault/ViewPage.xaml (+454 -394)
📝 src/App/Pages/Vault/ViewPage.xaml.cs (+13 -0)
📝 src/App/Utilities/InverseBoolConverter.cs (+1 -1)
📝 src/App/Utilities/IsNotNullConverter.cs (+1 -1)
📝 src/App/Utilities/StringHasValueConverter.cs (+1 -1)

📄 Description

Objective

Bugfix for #1197:

No matter what type of entry you're creating or viewing, VoiceOver is seeing the text fields for every other type of entry (IE, if creating a secure note you see text fields for username, password, credit card number and so on)

The cause of the bug was that VoiceOver (the iOS screenreader) reads invisible elements (i.e. those with IsVisible="False"). However, IsVisible is the primary means for showing/hiding relevant/irrelevant fields and controls.

Code Changes

Whether an element is “visible” to VoiceOver is determined by a separate property, AutomationProperties.IsInAccessibleTree. However, unlike IsVisible, this does not affect child items, so it cannot effectively be applied to a parent StackLayout to hide its children from VoiceOver.

I have therefore generally taken the following approach:

  • Where IsVisible is set on an individual element, set IsInAccessibleTree on that element with the same value.
  • Where IsVisible is set on a layout element, add IsInAccessibleTree to each child with the same value as the parent.
  • However, I didn't do this for the main controls for each item type, because of the large number of elements. Instead, they are added/removed from the element tree as required using code behind.

Issues

The Add URI button is still being picked up by VoiceOver on the AddEdit page, even when it's invisible and IsInAccessibleTree is set to False. I figure I'd looked at this long enough, maybe someone else can spot what's going on.

Other than that, I have tested this on my iPhone 6 and it all works as expected.


🔄 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/1213 **Author:** [@eliykat](https://github.com/eliykat) **Created:** 1/11/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `voiceover-reads-hidden-controls` --- ### 📝 Commits (4) - [`5597a34`](https://github.com/bitwarden/android/commit/5597a348ed2b23c062ef7067f4fd196cec02980b) make VoiceOver only read password when visible - [`1c2c525`](https://github.com/bitwarden/android/commit/1c2c52558113f11903187d8a3efa5367802e8d1e) add/remove elements instead of using isVisible - [`e128611`](https://github.com/bitwarden/android/commit/e128611d5a886e7cc9ea0e445b08def525a5b369) Set IsInAccessibleTree prop to match IsVisible - [`1880e9b`](https://github.com/bitwarden/android/commit/1880e9bbb6a9efb3a7e707883277e5441cc4ecdf) Remove unnecessary AutomationProperties ### 📊 Changes **7 files changed** (+881 additions, -767 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Vault/AddEditPage.xaml` (+389 -370) 📝 `src/App/Pages/Vault/AddEditPage.xaml.cs` (+22 -0) 📝 `src/App/Pages/Vault/ViewPage.xaml` (+454 -394) 📝 `src/App/Pages/Vault/ViewPage.xaml.cs` (+13 -0) 📝 `src/App/Utilities/InverseBoolConverter.cs` (+1 -1) 📝 `src/App/Utilities/IsNotNullConverter.cs` (+1 -1) 📝 `src/App/Utilities/StringHasValueConverter.cs` (+1 -1) </details> ### 📄 Description # Objective Bugfix for #1197: > No matter what type of entry you're creating or viewing, VoiceOver is seeing the text fields for every other type of entry (IE, if creating a secure note you see text fields for username, password, credit card number and so on) The cause of the bug was that VoiceOver (the iOS screenreader) reads invisible elements (i.e. those with `IsVisible="False"`). However, `IsVisible` is the primary means for showing/hiding relevant/irrelevant fields and controls. # Code Changes Whether an element is “visible” to VoiceOver is determined by a separate property, `AutomationProperties.IsInAccessibleTree`. However, unlike `IsVisible`, this does not affect child items, so it cannot effectively be applied to a parent `StackLayout` to hide its children from VoiceOver. I have therefore generally taken the following approach: * Where `IsVisible` is set on an individual element, set `IsInAccessibleTree` on that element with the same value. * Where `IsVisible` is set on a layout element, add `IsInAccessibleTree` to each child with the same value as the parent. * However, I didn't do this for the main controls for each item type, because of the large number of elements. Instead, they are added/removed from the element tree as required using code behind. # Issues The **Add URI** button is still being picked up by VoiceOver on the AddEdit page, even when it's invisible and `IsInAccessibleTree` is set to `False`. I figure I'd looked at this long enough, maybe someone else can spot what's going on. Other than that, I have tested this on my iPhone 6 and it all works as expected. --- <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 2025-11-26 23:24:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2794