pocket-casts-ios
pocket-casts-ios copied to clipboard
Make SwitchCell easier to use with assistive technologies
Current implementation of SwitchCell does not support easier navigation with VoiceOver or other assistive technologies due to the fact that all UI elements are exposed as accessibility children. When cells have a switch and it is the only action button, tapping on the whole cell using assistive technologies should toggle its value. More over, it should not be separate accessibility element.
To test
- Turn voiceover on
- Go to app settings from the profile tab
- Tap on Notifications
- Use swipe left or right gestures with one finger and try toggling notifications on and off
Current behavior:
Voiceover treats label of the cell and the switch as two elements requiring users to swipe twice before reaching the switch. This gets more problematic if there are a lot of switches like in General section of app settings.
Behaviour after this fix:
Voiceover treats cell label and switch control as single element and double tapping on it toggles its value just like in Apple's apps.
@emilylaguna could you please add Accessibility label to this pr?
Hey @adincebic, thank you so much for your contribution 🙌 👏 .
I gave this a test and everything is working with the exception of it bypassing the isLocked state (See the comment below)
However I agree with @fsalata below that if we're updating the accessibility for this view we should also update it to reuse the system accessibility features by moving the switch into
accessoryView
.What do you think about making that change?
Sure, I'll get to it as soon as possible.
@emilylaguna @fsalata
- I moved cellSwitch to accessoryView
- Took isLocked into account
- Removed secondaryLabel from xib and Swift file
Please review.
Hey @fsalata @emilylaguna can I ask you to review this code once more? :)