Skip to main content
What's New


Best Practice 2.15 – Ensure that the visible label names match the name in the code (Advanced level)


All visible text labels should associate with the component programmatically. This can ensure that the speech-input user can rely on visible labels as a means to interact with the components.

 

Before Rectification After Rectification
The visible text label of the "Register" button on the mobile app does not match the name of the voice input command executed When a speech-input user speaks a command “Register”, the speech input does not activate the button control because the programmatic name that is enabled as a speech-input command does not match with the visible text label. The programmatic names are exactly the same as the visual text labels of the buttons. The programmatic names are exactly the same as the visual text labels of the buttons, so that the speech-input user can activate the control by speaking the visual text label.
Speech-input command does not match with the visible text label. The speech-input user can activate the control by speaking the visual text label.

 

W3C WCAG Reference: 2.5.3 Label in Name