sentence-like-label

The label should not be a sentence and therefore it should not end with a period.

Who might be affected
Screen Reader
Cognitive

Description

Font weight, letter case, and punctuation affect how screen readers convey content in pitch and inflection. Using a period in control names will result in VoiceOvers reading it with the inflection of the end of a sentence, causing confusion in those who are sensitive to it, as well as insecurity in understanding the interface.

Quick Fixes

  • Ensure that the accessibility labels of controls do not contain punctuation.
  • Ensure that the accessibility labels are short and descriptive.

iOS (SwiftUI):

1Button("Add to cart") {
2 // The logic for adding a peach to the cart.
3 }
4 .accessibilityLabel("Add peaches to the cart")
1Button("Add to cart") {
2 // The logic for adding a peach to the cart.
3 }
4 .accessibilityLabel("Add the peaches to the cart, and continue to checkout or keep shopping.")

Android (.xml):

1<Button
2 android:id="@+id/btnBuyPeach"
3 android:contentDescription="Add peaches to the cart"
4 .../>
5
1<Button
2 android:id="@+id/btnBuyPeach"
3 android:contentDescription="Add the peaches to the cart, and continue to checkout or keep shopping."
4 .../>
5

Android (Kotlin):

1✓ btnBuyPeach.contentDescription = "Add peaches to the cart"
1✗ btnBuyPeach.contentDescription = "Add the peaches to the cart, and continue to checkout or keep shopping."

Android (Java):

1✓ btnBuyPeach.setContentDescription("Add peaches to the cart")
1✗ btnBuyPeach.setContentDescription("Add the peaches to the cart, and continue to checkout or keep shopping.")

React Native:

1<Button accessibilityLabel={“Add peaches to the cart”}>Add to cart</Button>
1<Button accessibilityLabel={“Add the peaches to the cart, and continue to checkout or keep shopping.”}>Add to cart</Button>

How Users Are Affected

The use of sentences and unwanted punctuation in button labels affects the pronunciation of screen readers, which can lead to loss of context or even misunderstanding of the element's purpose.

WCAG Success criteria

This issue might cause elements to fail one or more of the following Success criteria:
3.1.6 Pronunciation (AAA)

Guidelines for Creating Labels - Apple Human Interface Guidelines