Chapter 6: Accessibility Label

The elements on the UI need to be exposed to the accessibility services such as Talkback and Voiceover. Content authors should ensure that the accessibility label is available for every UI element the user is expected to interact or navigate. The normal text displayed on the screen will be accessible by default and the content authors are not expected to add any new attributes for it.
The user interface elements may be static such as a submit button or dynamic as a mute/ unmute button. In both the cases the accessibility label should be accurately exposed to the assistive technology user.

How to provide the accessibility label

Android

Android:contentDescription attribute can provide the accessible label for static element. The text provided in this attribute will be readout by talkback.
If the UI element is dynamic (changes depending on user interaction), the setcontentDescription() method in the logic of the XML. The value of the setcontentDescription() method changes if the user interacts with the element.
For edit text boxes use android:hint to expose the label if the element is static and setHint() method for dynamic fields.
In case the content author do not want to expose the existence of the UI element to the accessibility services set android:contentDescription attribute to null.

IOS

If the content author is using the basic controls supplied by the SDK, do not worry about the accessibility label. This will be already taken care. The accessibility label will be derived from the title of the control. If the content authors use a custom control or the label of the standard control has to be changed then use the accessibilityLabel attribute.
var accessibilityLabel: String? { get set }
IF the UI control is dynamic?

What is a good accessibility label?

The label text which is simple and clear about the target or the action.
The label that does not contain it’s type. Eg: Submit is sufficient not submit button.
The label that is changed when the user interacts if it has the dynamic property. Eg: If user activates the mute button the label should be changed to unmute and need to be exposed to the user.

WCAG Success Criteria

3.3.2 Labels or Instructions (Level A)

Share and Enjoy !

0Shares
0 0

Contact Us

Maxability Pvt Ltd Flat 360,
Block D2 SLS Signature Appartments,
Kaverappa Layout, Kadubeesanahalli,
Bangalore - 560103.

6366496664