Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Adding focusable to generated <svg> tag based on props#28

Open
peasandwell wants to merge 1 commit intoMoOx:masterfrom
peasandwell:focusable-attribute
Open

Adding focusable to generated <svg> tag based on props#28
peasandwell wants to merge 1 commit intoMoOx:masterfrom
peasandwell:focusable-attribute

Conversation

@peasandwell
Copy link
Copy Markdown

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.

@MoOx
Copy link
Copy Markdown
Owner

MoOx commented Jan 26, 2019

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

@peasandwell
Copy link
Copy Markdown
Author

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.

@MoOx
Copy link
Copy Markdown
Owner

MoOx commented Jan 29, 2019

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.

@peasandwell
Copy link
Copy Markdown
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants