Day 50

Labels, traits, and values for the same experience

7 Jul 2022

A similar experience can sometimes be achieved in different ways using labels, traits, and values. Most times there are no right or wrong answers; it will be up to your users to say which approach they like the most.

Three approaches to show a like button that looks like a heart. Filled for selected, unfilled for unselected. First approach is to use the

Two great pieces of advice though:

> @Sommer: "Check and see how Apple's own apps handle similar scenarios. Not because our apps are perfect but rather to help build on consistent patterns."

>

> Tweet by @Sommer

> @dotjay: "Meet the platform expectations, and give users control rather than prescribing what you think users want."

>

> Tweet by @dotjay. The original tweet is no longer available.

Some of you have asked me how you can support what I do. This would really help, and would be hugely appreciated:

  • Find these posts useful? Share them at work, on social media, or with anyone that might find them interesting. Let's spread the word!

  • Check out any of my apps or games: Xarra!, RetroRapid!, or Mestre!.

    • A download and a review go a long way. They're free by default. On the App Store, ratings and reviews really help more people discover them.

    • Finding any of them useful? If so, and if you can afford it, purchasing lifetime access to all features or subscribing lets me buy the coffee that keeps me caffeinated. Caffeine keeps me going to maintain the apps, bring in new features that I hope you'll love, and keep writing.

You may also find interesting...

There are details conveying important information that are shown visually with little icons, badges, progress bars, and similar cues that can be missed when they are not added as part of the accessibility label or accessibility value of a UI component.

Accessibility labels might not be the best input labels, used for example to find or interact with elements with Voice Control or Full Keyboard Access. In those cases, you can provide accessibility user input labels.

UISliders are adjustable, and its default accessibility value is represented in percentages. But that's not always the best format to express a value. Consider a slider to select a distance radius. Miles or km seem a more appropriate unit. Example code in the image: ```swift override var accessibilityValue: String? { get { let formatter = MeasurementFormatter() let measurement = Measurement( value: Double(value), unit: .kilometers ) formatter.unitStyle = .long return formatter.string(from: measurement) } set {} } ```


Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details