a11y.button-nameButtons with no name
Why it matters
A button that holds only an icon (the hamburger menu, the magnifying glass, the cross that closes a dialog) is announced as "button" and nothing else. Someone using a screen reader can't tell the menu from the basket, and someone using voice control has nothing to say to press it.
A button's name comes from the text inside it, the alt of an image inside it, an aria-label, or a title. An icon drawn with CSS or an SVG with no <title> gives it none.
Source: WCAG 2.2, 4.1.2 Name, Role, Value (Level A).
How to fix it
Name the button for what it does, not what it looks like:
<button type="button" aria-label="Open menu">
<svg aria-hidden="true">…</svg>
</button>Text that is there for screen readers and hidden from sight works as well, and survives translation tools better than aria-label.