react-svg-inline icon indicating copy to clipboard operation
react-svg-inline copied to clipboard

Adding focusable to generated <svg> tag based on props

Open peasandwell opened this issue 6 years ago • 4 comments

IE11 has a fun bug where it treats all SVGs as tabbable elements, even if they have tabindex="-1" on. The most recognised solution is to apply focusable="false" onto the <svg> element.

peasandwell avatar Jan 24 '19 16:01 peasandwell

You can already handle that in your SVGs directly right? I was thinking about deprecating this module in favor of svgr

MoOx avatar Jan 26 '19 15:01 MoOx

I have the attribute on the SVG, however react-svg-inline doesn't pass it through to the DOM. I'll check out svgr too in case you deprecate this module.

peasandwell avatar Jan 27 '19 10:01 peasandwell

however react-svg-inline doesn't pass it through to the DOM

It the code too agressive here? https://github.com/MoOx/react-svg-inline/blob/master/src/index.js#L72 Not sure what's causing this to disappear.

MoOx avatar Jan 29 '19 13:01 MoOx

It the code too agressive here? https://github.com/MoOx/react-svg-inline/blob/master/src/index.js#L72 Not sure what's causing this to disappear.

I think that is what's happening, or maybe something else is either stripping it out or choosing not to consider it an attribute.

peasandwell avatar Jan 29 '19 14:01 peasandwell