Visually hidden label should have additional information
Description
The accessibility case “Visually hidden label should have additional information” refers to the practice of providing labels or instructions that are visually hidden (using CSS techniques like visibility: hidden;
, or positioning elements off-screen) but still accessible to assistive technologies like screen readers. This approach is often used to enhance accessibility for users who rely on these technologies without altering the visual layout of the webpage for sighted users. However, simply hiding labels visually without providing additional context or information can lead to confusion for some users, especially those with cognitive disabilities.
Disabilities impacted
- Visual impairments: users with visual impairments rely heavily on screen readers to navigate web content. Visually hidden labels are crucial for these users, as they provide necessary context and information about interactive elements. Without additional descriptive text, these users might struggle to understand the purpose or function of certain elements.
- Cognitive disabilities: individuals with cognitive disabilities may find it challenging to remember or understand complex navigation structures or the purpose of various elements on a page. Additional descriptive text or instructions that are visually hidden but available through assistive technology can significantly aid comprehension and navigation.
- Motor impairments: while primarily a concern for visual and cognitive impairments, users with motor impairments who rely on assistive technologies for navigation can also benefit from clear, descriptive labels. This ensures that interactive elements are easily identifiable and operable.
Why it matters
Ensuring accessibility is not only a matter of compliance with legal standards but also crucial for inclusivity. By providing additional descriptive text for visually hidden labels, developers can significantly improve the usability of their websites for users with disabilities. This practice supports the principle of equal access to information and functionality, fostering a more inclusive digital environment.
Coding problems and solutions
Common coding problems
- Lack of sufficient descriptive text: a common issue arises when labels are visually hidden but lack sufficient descriptive text, leading to ambiguity for users relying on screen readers. Another problem occurs when interactive elements are labeled in a way that is unclear or misleading when read out of context by assistive technologies.
How to Fix It
To address these issues, developers should:
- Use
aria-label
,aria-labelledby
, ortitle
attributes to provide additional descriptive text for visually hidden labels. - Ensure that the descriptive text is concise yet informative enough to convey the purpose or action of the element.
- Regularly test the website with screen readers to identify and rectify any accessibility issues.
Known Limitations
While visually hidden text can greatly aid accessibility, it’s important to note that not all screen readers handle hidden text in the same way. Some older models or less common screen readers might not read out aria-label
attributes consistently. Additionally, over-reliance on visually hidden text without considering other forms of accessible design can lead to a less inclusive user experience.
Resources
Rule
- ID:
label-visually-hidden-only