mapbox-gl-js
mapbox-gl-js copied to clipboard
Setting `aria-label` on a div requires a `role` as well
As per W3 guidelines, attaching an aria-label on nameless elements (in this case it's a div by default) does not apply the aria-label.
https://github.com/mapbox/mapbox-gl-js/blob/93ef85650244e67c3b666c93e2c1c4205dfdca3b/src/ui/marker.js#L168
My suggestion would be to add a basic role which would likely be role="img" right next to the line above.
if (!this._element.hasAttribute('role')) this._element.setAttribute('role', 'img');
Hey, I would love to work on this issue @EliRobinson @stepankuzmin