Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handle accessibility for UITableViewCell with multiple labels and switch

I've got a UITableViewCell with two labels (title and description) and a switch (UISwitch) next to it. I'm looking for suggestions on how to optimize the cell for visually impaired people.

Cell picture with two labels and switch At the moment I've set isAccessibilityElement to false on the cell, and set the value to true for the two labels as well as the UISwitch.

Furthermore each label has the given text as accessibilityLabel. The switch has the text from the title label as the accessibilityLabel:

Accessibility inspector from UISwitch

Do you think this is a good approach for helping visually impaired people? I'm looking forward to further opinions on this topic, as I didn't found any other apps using a similar layout.

Thanks🙂

like image 852
user3532505 Avatar asked Feb 18 '26 02:02

user3532505


1 Answers

According to the content of your title and description, an appropriate solution could consist in gathering the title, the label and the switch control into a unique UIAccessibleElement so as to reduce the selections to be done to get information and/or to perform actions.

Get code snippets for this implementation (Objc or swift) and take a look at this detailed WWDC video inside which the question 'How to gather several elements into a single one ?' should provide additional information.

like image 142
XLE_22 Avatar answered Feb 20 '26 14:02

XLE_22