DTC Commerce Growth Lab

DTC Commerce Growth Lab ·

Keep visible purchase-button words in the accessible name

Keep visible purchase-button words in the accessible name

Compare the words a shopper sees on a purchase control with the name exposed to assistive technology. W3C’s Label in Name criterion says that for controls labeled with text or images of text, the accessible name contains the visible text. This matters when a person uses speech input to activate a button by saying the words shown on the page.

Start with the main actions in one buying path: choosing an option, adding an item, editing the cart, and continuing to checkout. Record the visible wording and the corresponding accessible name through the appropriate inspection process. Keep the exact page and component version so a developer can find the control being discussed.

Use a concrete comparison. If the visible words are Add to cart, check that those words are represented in the accessible name as the criterion requires. Additional useful context may exist, but it should not replace the visible words with an unrelated command. W3C notes that placing the label text at the start of the name is a best practice.

Review repeated product cards together. A name may need enough context to distinguish items while preserving the visible action wording. Test the actual interface with the relevant input methods instead of assume a familiar visual button is correctly named. Keep the chosen naming approach consistent through the existing component system.

Check localized versions independently. A Chinese visible label and an unrelated English-only accessible name can create a mismatch for the intended user. Use the actual language design and appropriate review rather than mechanically copy a previous template. The product identity and action should remain understandable in each version.

Keep the label review separate from other control checks. Target size, keyboard access, and focus visibility still need their relevant assessment. W3C’s target-size explanation addresses another part of operating a control; a good name does not establish every property of the interface.

After correction, inspect the deployed output and retest the affected path. A clear match between visible words and accessible naming helps customers operate the actions they intend, giving the furniture buying flow a more predictable connection between what is displayed and what can be activated.

Sources and further reading

This is general information. Check the relevant authority or manufacturer for the rules, compatibility and terms that apply to your situation.

More practical guides