Skip to content

Announce selected post categories to VoiceOver - #25893

Open
amitraj2203 wants to merge 1 commit into
wordpress-mobile:trunkfrom
amitraj2203:fix/25737-voiceover-selected-categories
Open

Announce selected post categories to VoiceOver#25893
amitraj2203 wants to merge 1 commit into
wordpress-mobile:trunkfrom
amitraj2203:fix/25737-voiceover-selected-categories

Conversation

@amitraj2203

@amitraj2203 amitraj2203 commented Aug 13, 2026

Copy link
Copy Markdown

Description

Fixes #25737

In the post settings categories picker, selection is shown with a checkmark drawn in an image view. That image carries no accessibility information, so VoiceOver read a selected and an unselected category exactly the same way. The state was available by sight only.

configureRow now makes the cell a single accessibility element and gives it the .selected trait when the category is picked. The state is not written into the label text, as the issue asks, so there are no new strings to translate.

The cell needs isAccessibilityElement = true for this to work: by default UIKit builds the element from the cell subviews, and a trait set on the cell itself never reaches it.

configureNoCategoryRow is left alone. It uses accessoryType = .checkmark, which UIKit already exposes.

Testing instructions

VoiceOver does not run in the iOS Simulator, so this was checked with Accessibility Inspector, which reads the same accessibility tree. On a device, VoiceOver reads "Books, selected" for a picked category and "Movies" for one that is not picked.

  1. Add two or more categories to a site.
  2. Open a post, go to post settings, and tap Categories.
  3. Select one category and leave another unselected.
  4. Open Xcode > Open Developer Tool > Accessibility Inspector, target the Simulator, and inspect each row.
  5. A selected row has the Selected trait. An unselected row has no traits.
  6. The Label is only the category name, with no "selected" text in it.
  7. Tap a row to toggle it and inspect again. The trait follows the selection, and stale traits are not left behind on reused cells.

Before

before.mov

After

after.mov

The category rows showed selection only through a checkmark image, which
carries no accessibility information. VoiceOver read the same thing for a
selected and an unselected category, so the state was conveyed by sight
only.

Make the cell one accessibility element and give it the selected trait
when the category is picked. The state is not added to the label text, so
nothing new needs translating.

Fixes wordpress-mobile#25737
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.

[ACCESSIBILITY] VoiceOver doesn't detect selected categories

1 participant