Skip to content

Button with just an icon in it, aria-labelledby

What it sounds like

Add a question, Button

If there’s visible text, we prefer to use that for accessible names. Note how aria-labelledby overrides both the aria-label and the text of the button. It’s better to have the text in the button.

What it looks like

Add a question

<p id="button-text">Add a question</p>

<button type="button" aria-label="Add" aria-labelledby="button-text">