16 February 2024

If you use the aria-label attribute to provide alternative text for a button, screen readers will prioritize reading out the content of the aria-label attribute over the visible text on the button.

Source code viewer
  1. <button aria-label="Submit Form">Submit</button>
  2.  
  3. <!-- The screen reader will read out "Submit Form" instead of "Submit" when it encounters the button element. -->
Programming Language: HTML