Closed
Description
I found this bug while using Macbook Ventura. When the overlay that says "use command + scroll to zoom the map" appears it creates a role="alert" when the overlay is removed it has a role="null"
"null" is not a valid role type and creates an accessibility error. I would suggest using role="none" instead, unless there is a better fitting option. You can read more about role types here
mapbox-gl-js version:
2.14.1
browser:
chrome, edge
Steps to Trigger Behavior
- move curser on to map and scroll up or down with mouse
- inspect the DOM where the class "mapboxgl-scroll-zoom-tracker" is
- while scrolling you can see the role change from alert to null
you can also see this by running axe devTools on a page with the map and you'll get the error "ARIA roles used must conform to valid values"
Link to Demonstration
https://docs.mapbox.com/mapbox-gl-js/example/cooperative-gestures/
Expected Behavior
role to be a valid type
Actual Behavior
role="null" an invalid type