# How to give links and buttons an accessible name

> Icon-only links and empty buttons are read out as "link" or "button". Add visible text or an aria-label.

Accessibility · HTML version: https://getreport.app/learn/link-names

## Link and button names

Passing looks like: Every link and button has an accessible name.

**Why it matters.** Icon-only links and buttons are read out as "link" or "button" with nothing else, so screen reader users cannot tell the cart from the search. Search engines also use link text to understand the target page.

**How to fix it.**

1. Add visible text, or aria-label="…" on the link or button, that says where it goes or what it does.
2. For icon buttons, put the text inside the button and hide it visually with a screen-reader-only class.

Check your own page: https://getreport.app/
