Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
ignore external embedded iframes from a11y checks
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhmarsh committed Dec 27, 2021
1 parent b1862c4 commit 5c37d2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ addDecorator(marbleGlobalJSDecorator);
addDecorator(withA11y);

export const parameters = {
a11y: {
config: {
rules: [
{
id: 'frame-tested',
selector: 'iframe:not(.a11y-ignore)', // ignore iframes with a11y-ignore class
},
],
},
},
backgrounds: {
values: [
{ name: "white", value: colorVariables.colorWhite },
Expand Down
1 change: 1 addition & 0 deletions src/components/rte-components/rte-components.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const RTEComponentsMarkUp = (model) => {
<hr>
<div class="media__youtube-wrapper">
<iframe
class="a11y-ignore"
title="Youtube Embed"
width="720"
height="428"
Expand Down
1 change: 1 addition & 0 deletions src/components/vimeo-player/vimeo-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const videoTemplate = html`<div
</a>
<iframe
class="a11y-ignore"
data-chromatic="ignore"
src="https://player.vimeo.com/video/395251744?dnt=1&amp;
loop=1&amp;
Expand Down

0 comments on commit 5c37d2a

Please sign in to comment.