A functional image triggers an action, so its accessible name should describe what it does or where it leads—not what it looks like. A magnifying-glass icon that searches needs the name “Search”; a linked logo might need “Home page.” section 3.3.3
Give image links and controls a meaningful accessible name, usually with alt text. For an icon-only button, use alt text on the image or aria-label on the button and treat the image as decorative. Visible text already names a control; avoid aria-label when it could override or duplicate that text. section 3.3.3
<button aria-label="Search"> #A <img src="images/search.png" alt=""> #B </button>
This button names the action with aria-label and keeps its icon from being announced separately. section 3.3.3
An icon can also add useful context, such as warning that a link opens in a new window. If the visible link text already says so, make the icon decorative to prevent duplicate announcements. section 3.3.3
