Skip to content

Commit e5f326f

Browse files
committed
hide svg patterns in visually-hidden
1 parent 2fec55d commit e5f326f

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

examples/components/ParallaxExample/ParallaExample.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,13 @@
2626
background-color: #fff;
2727
border: none;
2828
}
29+
30+
.visually-hidden {
31+
position: absolute;
32+
top: 0;
33+
left: 0;
34+
height: 0;
35+
width: 0;
36+
overflow: hidden;
37+
}
2938
}

examples/components/ParallaxExample/ParallaxExample.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ export default class ParallaxExample extends Component {
2525
<Marquee />
2626
<Overlap />
2727
<TriangleGrid />
28-
29-
<Svg svg={noisePattern} />
30-
<Svg svg={dotPattern} />
28+
29+
{/** Shared SVG patterns */}
30+
<div className="visually-hidden">
31+
<Svg svg={noisePattern} />
32+
<Svg svg={dotPattern} />
33+
</div>
3134
</div>
3235
);
3336
}

0 commit comments

Comments
 (0)