Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make aria-label configurable for Map, Marker and Popup #4147

Merged
merged 4 commits into from
May 25, 2024

Conversation

thom4parisot
Copy link
Contributor

@thom4parisot thom4parisot commented May 21, 2024

Map <canvas> default aria-label, Marker default aria-label and Popup default close button aria-label are made configurable to suit better the web page locale.

Also, the <canvas> element is keyboard focusable (tabindex="0") only when the map is interactive. Otherwise, it acts as an illustration—maybe it should be reflected as a role="presentation" attribute?

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.78%. Comparing base (daa947c) to head (1625517).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4147      +/-   ##
==========================================
+ Coverage   86.73%   86.78%   +0.04%     
==========================================
  Files         242      242              
  Lines       33071    33076       +5     
  Branches     2029     2040      +11     
==========================================
+ Hits        28685    28704      +19     
+ Misses       3402     3378      -24     
- Partials      984      994      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Member

HarelM commented May 21, 2024

Thanks! Can you add a changelog item please?

@thom4parisot thom4parisot changed the title Configurable <canvas> aria-label via an i18n label Make aria-label configurable for Map, Marker and Popup May 22, 2024
@thom4parisot thom4parisot force-pushed the fix/aria-label-i18n branch 3 times, most recently from c10c641 to 4a9843c Compare May 22, 2024 16:52
@thom4parisot thom4parisot marked this pull request as ready for review May 22, 2024 16:52
@thom4parisot
Copy link
Contributor Author

Hi @HarelM, I've proceeded to a couple more changes as well as reflecting them with tests and CHANGELOG entries.

We are in the process of auditing the accessibility of a map-heavy application (https://cartobio.agencebio.org) with the French guidelines (RGAA—a port of WCAG). So I'm happy to contribute more changes as we go along.

@HarelM
Copy link
Member

HarelM commented May 22, 2024

Check out the following issues which are related to accessibility. I was unable to understand how to solve them, but you might be able to:
https://github.com/maplibre/maplibre-gl-js/issues?q=is%3Aissue+accessibility

Any progress in that front would be great.

CHANGELOG.md Outdated Show resolved Hide resolved
@thom4parisot thom4parisot force-pushed the fix/aria-label-i18n branch 2 times, most recently from ec28586 to 5709a07 Compare May 23, 2024 07:40
src/ui/popup.ts Outdated Show resolved Hide resolved
@thom4parisot thom4parisot force-pushed the fix/aria-label-i18n branch 2 times, most recently from bbb31d9 to 48e83a1 Compare May 23, 2024 09:37
src/ui/marker.test.ts Outdated Show resolved Hide resolved
src/ui/marker.test.ts Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@HarelM HarelM enabled auto-merge (squash) May 25, 2024 17:24
@HarelM HarelM merged commit 7c07112 into maplibre:main May 25, 2024
15 checks passed
@thom4parisot thom4parisot deleted the fix/aria-label-i18n branch May 25, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants