zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.07k stars 424 forks source link

SVG generated by `Geography` should not generate elements with `tabindex="0"` #276

Open seedy opened 2 years ago

seedy commented 2 years ago

Description

SVG nodes generated by Geography component all have an attribute tabindex="0".

Screenshot taken from generated svg from this example: image

This behaviour adds any generated svg node to the tab navigation, which is not recommended for obvious accessibility reasons.

Users without a mouse might be trapped in there for a while :sweat_smile:

Workaround

This line is culprit

My workaround, as we can pass down extra props to the Geography component, is to override this behavior by adding tabindex="-1", which should be the expected default.