PolymerElements / iron-iconset-svg

Represents a source of icons expressed as a collection of inline SVGs
https://www.webcomponents.org/element/PolymerElements/iron-iconset-svg
37 stars 34 forks source link

SVG elements are always focusable in IE11 #46

Closed braddiver closed 6 years ago

braddiver commented 8 years ago

Description

Any SVG elements written by iron-iconset-svg will be put into the tab order of the page in IE11.

Expected outcome

SVG elements should not be focusable by default

Adding this line of code in the _prepareSvgClone function fixes the problem: svg.setAttribute('focusable', false);

dlockhart commented 8 years ago

Adding some extra details from a duplicate issue I created in iron-icon:

This occurs In both Edge and IE11, and occurs even with a tabindex="-1" -- since apparently that's part of the SVG2 spec, which IE does not yet support.

Live Demo

https://jsbin.com/subavuciji/edit?html,output

Browsers Affected

Potential Fix

As noted above in the description, and from this article on StackOverflow, set the focusable attribute to false: <svg focusable="false"></svg>

timove commented 8 years ago

Tested on IE 11: adding svg.setAttribute('focusable', 'false'); into _prepareSvgClone works as expected.

AlvaroGonzalezCans commented 7 years ago

Hello, what is the state of this issue?