Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(PPDSC-2811): update screen-reader-only scenarios #662

Merged
merged 6 commits into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/screen-reader-only/__tests__/screen-reader-only.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@ import * as React from 'react';
import {ScreenReaderOnly} from '../screen-reader-only';
import {getSSRId} from '../../utils/get-ssr-id';
import {LinkStandalone} from '../../link';
import {StorybookCase, StorybookPage} from '../../test/storybook-comps';

const srOnly = getSSRId();

export const StoryScreenReaderOnly = () => (
<>
<LinkStandalone href="..." aria-describedby={srOnly}>
Google
</LinkStandalone>
<ScreenReaderOnly id={srOnly}>
The best known search engine
</ScreenReaderOnly>
</>
export const StorySreenReaderOnlyDefault = () => (
<StorybookPage>
<StorybookCase>
<LinkStandalone
href="https://www.newskit.co.uk/"
aria-describedby={srOnly}
>
NewsKit
</LinkStandalone>
<ScreenReaderOnly id={srOnly}>
An open source design system built by News UK, for everyone
</ScreenReaderOnly>
</StorybookCase>
</StorybookPage>
);
StoryScreenReaderOnly.storyName = 'ScreenReaderOnly';
StoryScreenReaderOnly.parameters = {
StorySreenReaderOnlyDefault.storyName = 'Default';
StorySreenReaderOnlyDefault.parameters = {
percy: {skip: true},
};

Expand Down