Skip to content

Commit

Permalink
Address feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Jun 5, 2018
1 parent ad6efc9 commit 78a8af9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Bug fixes**
- Removed `.nvmrc` file from published npm package ([#892](https://github.com/elastic/eui/pull/892))
- `EuiComboBox` no longer shows the _clear_ icon when it's a no-op ([#890](https://github.com/elastic/eui/pull/890))
- `EuiIcon` no longer takes focus in Edge and IE unless `tabIndex='0'` is specified ([#900](https://github.com/elastic/eui/pull/900))
- `EuiIcon` no longer takes focus in Edge and IE unless `tabIndex` is defined as a value other than `"-1"` ([#900](https://github.com/elastic/eui/pull/900))

## [`0.0.51`](https://github.com/elastic/eui/tree/v0.0.51)

Expand Down
8 changes: 6 additions & 2 deletions src/components/icon/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,12 @@ export const EuiIcon = ({
const Svg = typeToIconMap[type] || empty;

// This is a fix for IE and Edge, which ignores tabindex="-1" on an SVG, but respects
// focusable="false". We want to default SVGs to *not* be focusable.
const focusable = tabIndex === '0' ? 'true' : 'false';
// focusable="false".
// - If there's no tab index specified, we'll default the icon to not be focusable,
// which is how SVGs behave in Chrome, Safari, and FF.
// - If tab index is -1, then the consumer wants the icon to not be focusable.
// - For all other values, the consumer wants the icon to be focusable.
const focusable = (!tabIndex || tabIndex === '-1') ? 'false' : 'true';

return (
<Svg
Expand Down

0 comments on commit 78a8af9

Please sign in to comment.