Allow aria-label to be set on the canvas
See original GitHub issueTo give visually impaired users context for the canvas element, it should be possible to set an aria-label
on the canvas created by OpenLayers.
By setting the aria-label
we can comply to WCAG 1.1.1: Non-text-content.
The easiest way to achieve this is by simply hardcoding the aria-label to aria-label="Canvas element marked as an image"
,
but it would be better to be able to set it via the options in the constructor of the map:
const map = new Map({
ariaLabel: "An interactive map of the world",
...
})
This way the user has control over what the label should read.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
aria-label - Accessibility - MDN Web Docs
The aria-label attribute is intended for interactive elements only. Use aria-label to ensure an accessible name is provided when none is visible ...
Read more >HTML <canvas> Accessibility - Paul J. Adam
ARIA role=img sets the canvas as an image for the screen reader and an accessible name can be created with an aria-label string...
Read more >Image accessible name is descriptive[proposed] | ACT Rule
This canvas element has an aria-label attribute that incorrectly describes the image (the aria-label is “HTML5 logo” but the actual image is the...
Read more >Solved: Element Toggler - Canvas Community
aria-controls="Desktop_Content_1" aria- label="Toggler toggle list visibility" ... opens each Toggler field in the app to allow the content to be viewed.
Read more >Reflections on page elements for accessible courses
The LMS Canvas by Instructure comes with a decent set of styled elements ... This is used to interact with the element. aria-label="longer ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We could use an aria-label on the zoom-in and zoom-out buttons. So visually impaired people can understand them. This would help us to comply to WCAG SuccessCriterium 2.4.6. Headings and Labels
As rsids said: a hardcoded aria-label would go a long way, but the ability to set it in the configurations would be better (preferably we need to set the labels in Dutch).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.