Skip to content

Commit

Permalink
Merge pull request #563 from matuzalemsteles/issue-536
Browse files Browse the repository at this point in the history
Add flag to indicate if svg is focusable or not | Fixes #536
  • Loading branch information
carloslancha authored Feb 16, 2018
2 parents d183409 + c584fc5 commit a764232
Show file tree
Hide file tree
Showing 28 changed files with 795 additions and 746 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`ClayAlert should render a "danger" style alert 1`] = `
<div class="alert alert-danger fade show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full" focusable="false">
<title>exclamation-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#exclamation-full"></use>
</svg>
Expand All @@ -14,7 +14,7 @@ exports[`ClayAlert should render a "danger" style alert 1`] = `
exports[`ClayAlert should render a "success" style alert 1`] = `
<div class="alert alert-success fade show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full" focusable="false">
<title>check-circle-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#check-circle-full"></use>
</svg>
Expand All @@ -25,7 +25,7 @@ exports[`ClayAlert should render a "success" style alert 1`] = `
exports[`ClayAlert should render a "warning" style alert 1`] = `
<div class="alert alert-warning fade show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full" focusable="false">
<title>warning-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#warning-full"></use>
</svg>
Expand All @@ -36,13 +36,13 @@ exports[`ClayAlert should render a "warning" style alert 1`] = `
exports[`ClayAlert should render a closeable alert 1`] = `
<div class="alert alert-warning fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full" focusable="false">
<title>warning-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#warning-full"></use>
</svg>
Expand All @@ -53,7 +53,7 @@ exports[`ClayAlert should render a closeable alert 1`] = `
exports[`ClayAlert should render an "info" style alert 1`] = `
<div class="alert alert-info fade show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -64,7 +64,7 @@ exports[`ClayAlert should render an "info" style alert 1`] = `
exports[`ClayAlert should render an alert with classes 1`] = `
<div class="alert alert-info fade my-custom-class show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -75,7 +75,7 @@ exports[`ClayAlert should render an alert with classes 1`] = `
exports[`ClayAlert should render an alert with id 1`] = `
<div class="alert alert-info fade show" id="myId" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -86,7 +86,7 @@ exports[`ClayAlert should render an alert with id 1`] = `
exports[`ClayAlert should render default markup 1`] = `
<div class="alert alert-info fade show" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand Down
28 changes: 14 additions & 14 deletions packages/clay-alert/src/__tests__/__snapshots__/ClayStripe.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ exports[`ClayStripe should render a "danger" style stripe 1`] = `
<div class="alert alert-danger fade alert-dismissible alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full" focusable="false">
<title>exclamation-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#exclamation-full"></use>
</svg>
Expand All @@ -23,13 +23,13 @@ exports[`ClayStripe should render a "success" style stripe 1`] = `
<div class="alert alert-success fade alert-dismissible alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full" focusable="false">
<title>check-circle-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#check-circle-full"></use>
</svg>
Expand All @@ -42,13 +42,13 @@ exports[`ClayStripe should render a "warning" style stripe 1`] = `
<div class="alert alert-warning fade alert-dismissible alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full" focusable="false">
<title>warning-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#warning-full"></use>
</svg>
Expand All @@ -61,13 +61,13 @@ exports[`ClayStripe should render an "info" style stripe 1`] = `
<div class="alert alert-info fade alert-dismissible alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -80,13 +80,13 @@ exports[`ClayStripe should render an stripe with classes 1`] = `
<div class="alert alert-info fade alert-dismissible my-custom-class alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -99,13 +99,13 @@ exports[`ClayStripe should render an stripe with id 1`] = `
<div class="alert alert-info fade alert-dismissible alert-fluid show" id="myId" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -118,13 +118,13 @@ exports[`ClayStripe should render default markup 1`] = `
<div class="alert alert-info fade alert-dismissible alert-fluid show" role="alert">
<div class="container">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand Down
28 changes: 14 additions & 14 deletions packages/clay-alert/src/__tests__/__snapshots__/ClayToast.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
exports[`ClayToast should render a "danger" style toast 1`] = `
<div class="alert alert-danger fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-exclamation-full" focusable="false">
<title>exclamation-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#exclamation-full"></use>
</svg>
Expand All @@ -20,13 +20,13 @@ exports[`ClayToast should render a "danger" style toast 1`] = `
exports[`ClayToast should render a "success" style toast 1`] = `
<div class="alert alert-success fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-check-circle-full" focusable="false">
<title>check-circle-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#check-circle-full"></use>
</svg>
Expand All @@ -37,13 +37,13 @@ exports[`ClayToast should render a "success" style toast 1`] = `
exports[`ClayToast should render a "warning" style toast 1`] = `
<div class="alert alert-warning fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full" focusable="false">
<title>warning-full</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#warning-full"></use>
</svg>
Expand All @@ -54,13 +54,13 @@ exports[`ClayToast should render a "warning" style toast 1`] = `
exports[`ClayToast should render an "info" style toast 1`] = `
<div class="alert alert-info fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -71,13 +71,13 @@ exports[`ClayToast should render an "info" style toast 1`] = `
exports[`ClayToast should render an toast with classes 1`] = `
<div class="alert alert-info fade alert-dismissible my-custom-class show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -88,13 +88,13 @@ exports[`ClayToast should render an toast with classes 1`] = `
exports[`ClayToast should render an toast with id 1`] = `
<div class="alert alert-info fade alert-dismissible show" id="myId" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand All @@ -105,13 +105,13 @@ exports[`ClayToast should render an toast with id 1`] = `
exports[`ClayToast should render default markup 1`] = `
<div class="alert alert-info fade alert-dismissible show" role="alert">
<button class="btn close btn-unstyled" aria-label="Close" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-times" focusable="false">
<title>times</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#times"></use>
</svg>
</button>
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-info-circle" focusable="false">
<title>info-circle</title>
<use xlink:href="../node_modules/clay/lib/images/icons/icons.svg#info-circle"></use>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`ClayButton should render a button with classes 1`] = `<button class="bt

exports[`ClayButton should render a button with icon 1`] = `
<button class="btn btn-primary" aria-label="plus" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus" focusable="false">
<title>plus</title>
<use xlink:href="icons.svg#plus"></use>
</svg>
Expand All @@ -16,7 +16,7 @@ exports[`ClayButton should render a button with icon 1`] = `
exports[`ClayButton should render a button with icon and label 1`] = `
<button class="btn btn-primary" type="button">
<span class="inline-item inline-item-before">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus" focusable="false">
<title>plus</title>
<use xlink:href="icons.svg#plus"></use>
</svg>
Expand All @@ -25,7 +25,7 @@ exports[`ClayButton should render a button with icon and label 1`] = `
exports[`ClayButton should render a button with icon and monospaced true 1`] = `
<button class="btn btn-monospaced btn-primary" aria-label="plus" type="button">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus" focusable="false">
<title>plus</title>
<use xlink:href="icons.svg#plus"></use>
</svg>
Expand All @@ -41,7 +41,7 @@ exports[`ClayButton should render a button with label and ariaLabel 1`] = `<butt
exports[`ClayButton should render a button with label and icon 1`] = `
<button class="btn btn-primary" type="button">
<span class="inline-item inline-item-before">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus" focusable="false">
<title>plus</title>
<use xlink:href="icons.svg#plus"></use>
</svg>
Expand All @@ -51,7 +51,7 @@ exports[`ClayButton should render a button with label and icon 1`] = `
exports[`ClayButton should render a button with label and icon on right side 1`] = `
<button class="btn btn-primary" type="button">Label
<span class="inline-item inline-item-after">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-plus" focusable="false">
<title>plus</title>
<use xlink:href="icons.svg#plus"></use>
</svg>
Expand Down
Loading

0 comments on commit a764232

Please sign in to comment.