tanem / react-svg

:art: A React component that injects SVG into the DOM.

Home Page:https://npm.im/react-svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IE tab order

LiquidMusic1 opened this issue · comments

When using ReactSVG on IE, if I include an image and use the beforeInjection and afterInjection callback like so:

beforeInjection={ (svg) => { svg.setAttribute("tabindex","-1"); svg,setAttribute("aria-hidden", "true"); }}

afterInjection={ (error,svg) => { if(svg !== undefined){ svg.setAttribute("tabindex","-1"); svg.setAttribute("aria-hidden","true"); } }}

The resulting <svg> element has the tabindex set to -1, but is somehow (curiously) still in the tab order.

Resolved by adding the focusable property equal to 'false'