You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
My PR changes remove this attribute when alert is not visible. These are scroll zoom and touch pan alerts. I could also use "none" role, but both approaches seem to look correct.
Screen reader reads it correctly and axe devtool does not show an error.
What do you think about my approach? @mourner@aleavikraman
Tested on Chrome and Firefox on Windows 10 with axe devtools and NVDA screen reader.
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
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
The text was updated successfully, but these errors were encountered: