9.1.1.1a Control elements have alternative texts
- Programmierungintegration_instructions
Control elements are elements of the website that allow the user to perform actions (e.g. link, button). Adding alternative texts to control elements lets the user know their function (e.g. Play the animation).
Concerns Development
If an interactive element (e.g. button, link) contains visible text, this will automatically be used as its alternative text. If it does not have any, it should be added inside of it and can be visually hidden to not disturb the layout.
The visible name of the button should always be included in the alternative text (at the beginning), since some users can need it for vocal commands (ex: the Figures logo linking to the home page has "Figures home page" as its accessible text).
Test method
The best way to test the website for alternative texts is to use a screen reader (since it also gives an understanding of the user experience for blind users). A faster way is to right-click on the element, click "Inspect", and then look for its alternative text in the code.
Great for User experience
Adding alternative text, or “alt text” to control elements, means that interactive elements have a textual description, which screen readers can use. Without this, blind users would not be able to identify the purpose of elements relying mainly on visual appearance (e.g. icon showing an arrow or a plus button).
Great for SEO
Ensuring that control elements have text describing them improves the web crawlers’ understanding of the website structure and give contextual information to search engines on the content of the page.
Basic feature
In most cases, we add an alternative text to interactive elements as standard.
Example from our website
On our website, we ensured that those descriptions would benefit all users. For example, some could find the button that toggles the visibility of social media links on and off (represented by a heart symbol) confusing. By hovering it, the user can see the description “Show Social Media” which clarifies the role of the button (and is also the text that will be used by screen readers).