This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung
Accessibility
When does an Aria label help, and when does it hurt?
An aria label helps where an element has no visible text: on the button with a magnifying glass or on two menus that need names. It hurts where the text is, because it replaces it. aria-label is an attribute in the source code that gives an element a name that only auxiliary technology reads. If on the search button "Go" and in the attribute "Search on this website", the read-out program hears only the second text, and a voice command with "Go" can run into the void.
aria-label always precedes the text on the button
Browsers calculate the name of an element according to a fixed ranking, and aria-label is above the visible text. The W3C writes in its instructions: With buttons and links, the attribute hides the content from auxiliary technology and puts its value in its place. If there is already a visible label, aria-label should therefore be avoided or only used wisely. The attribute does not change anything on the screen. Anyone who only looks at the page never notices the difference.
What goes wrong with existing text
The voice control searches for the wording that the human reads on the screen. If it is missing in the name, the command may miss the button. Care also suffers: The W3C warns that text that is only in the source text is easily forgotten when the interface is changed. If the button after the relaunch is called "Request offer", the attribute can continue to say "Contact". For multilingual pages, each aria label must be translated separately; Otherwise the English visitor hears a German name. According to W3C, paragraphs and list points should not be named in this way.
Where aria-label is needed
The W3C explicitly mentions the case: The attribute is useful where no visible text is a good name. This includes the button, on which only a cross or magnifying glass can be seen. This also includes areas such as two menus on a page: On the nav element, the attribute gives the menu a name such as "products", and the links in it remain audible, because there it does not replace the content. Over existing text, an aria label may supplement the wording if it contains it in piece, preferably at the beginning.
Additional knowledge without intervention in the name
If a read-out program is to say more than is on the button, aria-describedby is the gentler way. This attribute points to another text of the page and provides a description that is announced after the name. The name remains the visible wording, and the voice control continues. The W3C calls this way for headings, instructions and group captions.
Examples
Link with different name
<a href="/preise" aria-label="Zu unseren Tarifen">Preise ansehen</a><a href="/preise">Preise ansehen</a>
<!-- oder ergänzend: aria-label="Preise ansehen für alle Tarife" -->The visible wording is at the beginning of the name. The voice control will find "View prices".
- Search for aria-label in the source text and compare each value with the visible text next to it. Say both the same, the attribute can go away.
- Include aria-label in your translation list. The values are not on the surface and do not stand out on a visual sample of the foreign language page.




