Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Latest commit

 

History

History
10 lines (6 loc) · 538 Bytes

18-accessible-labels-2.md

File metadata and controls

10 lines (6 loc) · 538 Bytes

18. Add Accessible Labels to Provide Elements with More Context

📹 Video

  • If you have many duplicate buttons on your page - for example, various 'Add to Cart' buttons on your e-commerce page, make sure to provide a descriptive aria-label. This will enable users on assistive devices to differentiate between the different buttons with ease.
<button aria-label={`${buttonText} ${productName}`}>{buttonText}</button>