Skip to content

Commit

Permalink
Address feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Jun 4, 2018
1 parent ad6efc9 commit 0d8460e
Showing 1 changed file with 6 additions and 2 deletions.
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 0d8460e

Please sign in to comment.