Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdIcon: SVGs always focusable in IE #7250

Closed
Fry74 opened this issue Feb 23, 2016 · 0 comments
Closed

mdIcon: SVGs always focusable in IE #7250

Fry74 opened this issue Feb 23, 2016 · 0 comments
Assignees
Labels
pr: merge ready This PR is ready for a caretaker to review
Milestone

Comments

@Fry74
Copy link

Fry74 commented Feb 23, 2016

Issue
In Internet Explorer 11 it appears that SVG icons are always treated as focusable unless explicitly specified otherwise, unlike in Chrome and Firefox. This means that in IE, focus will land on them when tabbing through a document.

Because of this, when mdIcon is used inside other elements (eg. buttons), it takes two presses of the tab key to move focus to the next element.

This makes life more difficult for screen-reader users, as is harder to traverse the document and when an icon gains focus there is no context to indicate what is being focused on.

To Reproduce
For a demonstration of this, view the Angular Material homepage in Chrome and in IE, and tab through the page, paying particular attention to the four large buttons on the homepage ('Getting Started', 'Demos', Customization', 'API Reference'). Notice that in Chrome, pressing tab immediately moves the focus to the next button, where as in IE, it takes two presses to move to the next item. This is because IE is first focusing the SVG icon within the button.

Suggested Fix
SVGs can be made non-focusable by setting them as:
<svg focusable="false>
This could be set on the SVG element when created by mdIcon.

@ThomasBurleson ThomasBurleson modified the milestone: 1.0.6 Feb 24, 2016
devversion added a commit to devversion/material that referenced this issue Feb 28, 2016
Currently IE11 always sets the SVG icons focusable.
This can be reproduced by tabbing through the `Getting Started` section of the docs.
There will be always two tab-steps when iterating through the icon button in IE11.

Fixes angular#7250
devversion added a commit to devversion/material that referenced this issue Feb 28, 2016
Currently IE11 always sets the SVG icons focusable.
This can be reproduced by tabbing through the `Getting Started` section of the docs.
There will be always two tab-steps when iterating through the icon button in IE11.

Fixes angular#7250
@devversion devversion added the pr: merge ready This PR is ready for a caretaker to review label Feb 28, 2016
ThomasBurleson pushed a commit that referenced this issue Mar 1, 2016
Currently IE11 always sets the SVG icons focusable.
This can be reproduced by tabbing through the `Getting Started` section of the docs.
There will be always two tab-steps when iterating through the icon button in IE11.

Fixes #7250

  Closes #7321
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

No branches or pull requests

3 participants