question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow aria-label to be set on the canvas

See original GitHub issue

To 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:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
krechjcommented, Dec 22, 2021

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).

0reactions
stale[bot]commented, Apr 16, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found