github-corners icon indicating copy to clipboard operation
github-corners copied to clipboard

svg element needs focusable="false" to fix keyboard navigation for IE users

Open thibaudcolas opened this issue 3 years ago • 1 comments

Internet Explorer makes SVGs inside focusable content also focusable themselves – meaning IE users will have to hit tab twice to get past the corner, and it’s unclear where the focus is during this time. The solution is to simply add focusable="false" to the svg element:

<svg
      width="80"
      height="80"
      viewBox="0 0 250 250"
      style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;"
      aria-hidden="true"
      focusable="false"
    >

Here is a screen recording showing the issue for reference – you can see I have to press Tab three times to move from one textarea to the next, instead of the expected two.

ie11-focusable-false

thibaudcolas avatar Jul 12 '20 22:07 thibaudcolas

Ahh great catch, will try to fix this up this weekend!

tholman avatar Jul 15 '20 13:07 tholman