Skip to content

Commit

Permalink
fix(playground): hidden iframes are hidden from screen readers (#2802)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi authored Mar 2, 2023
1 parent ec9c5c6 commit 630c5f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/global/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,12 @@ export default function Playground({
*/}
{devicePreview
? [
<div className={!isIOS ? 'frame-hidden' : 'frame-visible'}>
<div className={!isIOS ? 'frame-hidden' : 'frame-visible'} aria-hidden={!isIOS ? 'true' : null}>
<device-preview mode="ios">
<iframe height={frameSize} ref={(ref) => handleFrameRef(ref, 'ios')} src={sourceiOS}></iframe>
</device-preview>
</div>,
<div className={!isMD ? 'frame-hidden' : 'frame-visible'}>
<div className={!isMD ? 'frame-hidden' : 'frame-visible'} aria-hidden={!isMD ? 'true' : null}>
<device-preview mode="md">
<iframe height={frameSize} ref={(ref) => handleFrameRef(ref, 'md')} src={sourceMD}></iframe>
</device-preview>
Expand All @@ -608,12 +608,14 @@ export default function Playground({
className={!isIOS ? 'frame-hidden' : ''}
ref={(ref) => handleFrameRef(ref, 'ios')}
src={sourceiOS}
aria-hidden={!isIOS ? 'true' : null}
></iframe>,
<iframe
height={frameSize}
className={!isMD ? 'frame-hidden' : ''}
ref={(ref) => handleFrameRef(ref, 'md')}
src={sourceMD}
aria-hidden={!isMD ? 'true' : null}
></iframe>,
]}
</div>,
Expand Down

1 comment on commit 630c5f1

@vercel
Copy link

@vercel vercel bot commented on 630c5f1 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ionic-docs – ./

ionic-docs-gqykycf8t.vercel.app
ionic-docs-git-main-ionic1.vercel.app
ionic-docs-ionic1.vercel.app

Please sign in to comment.