When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers. Lighthouse reports when any buttons do not have accessible names:
How to fix this problem
To fix this problem,
provide inner text for each
that is discernible to screen reader users
(see also Label buttons and links).
create clear calls to action:
When working with icon buttons,
aria-label attribute to clearly describe the action
to anyone using a screen reader, for example:
<button aria-label="Bold text icon"></button>
Learn more in Buttons must have discernible text.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.