mapbox-gl-accessibility
mapbox-gl-accessibility copied to clipboard
derive width and height from feature property
The accessible elements currently have a fixed width and height given in the plugin options. It would be nice to set from an expression evaluated per feature.
For example if you had a circle layer with variable circle-radius you could ensure the accessible element had the same width/height as the circle, so the focus style would match what's on the screen.
It looks like this has been fixed already https://github.com/mapbox/mapbox-gl-accessibility/blob/495365359af4870c5feb6b234b7ddaeb4d874177/index.js#L55-L68
It looks like this has been fixed already
That's for the source geometry only, it doesn't take into account the paint/layout properties on the layer which create a rendered feature which has a different box to the source geometry.