简体   繁体   中英

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.

带有两个标签和开关的单元格图片 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 :

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🙂

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM