-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2812 from SUI-Components/label-a11y-demo
docs(components/atom/label): add accessibility section on the docs
- Loading branch information
Showing
4 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {Article, Anchor, Box, Code, H2, Paragraph} from '@s-ui/documentation-library' | ||
|
||
const ArticleA11y = ({className}: {className?: string}) => { | ||
return ( | ||
<Article className={className}> | ||
<H2> | ||
Accessibility – <Anchor>Guidelines</Anchor> | ||
</H2> | ||
<Box style={{backgroundColor: 'color-mix(in srgb, #00FF00 10%, transparent)'}}> | ||
<Paragraph> | ||
✅ This component has been successfully tested for WCAG 2.0 levels A and AA, WCAG 2.1 levels A and AA and for | ||
common accessibility best practices. | ||
</Paragraph> | ||
</Box> | ||
<Paragraph> | ||
This component is based on the native label element, it will automatically apply the correct labelling when | ||
wrapping controls or using the <Code>htmlFor</Code> attribute. For your own custom controls to work correctly, | ||
ensure they use native elements such as button or input as a base. | ||
</Paragraph> | ||
</Article> | ||
) | ||
} | ||
|
||
export default ArticleA11y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.