Skip to content

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

@thibaudcolas

Description

@thibaudcolas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions