Skip to content

Commit

Permalink
Docs: Add Accessibility page (#2844)
Browse files Browse the repository at this point in the history
* Add Accessibility page

Fixes: #2704

* Update super-linter.yml
  • Loading branch information
coliff authored Sep 12, 2024
1 parent e581e13 commit 8050718
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
VALIDATE_EDITORCONFIG: false
VALIDATE_GITLEAKS: false
VALIDATE_HTML: false
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_NATURAL_LANGUAGE: false
Expand Down
26 changes: 11 additions & 15 deletions stencil-workspace/storybook/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ import yourTheme from './your-theme';
import { themes } from '@storybook/theming';
import addons from '@storybook/addons';
import { DocsContainer } from '@storybook/addon-docs';
import {
useDarkMode
} from 'storybook-dark-mode';
import '../../dist/modus-web-components/modus-web-components.css'
import { useDarkMode } from 'storybook-dark-mode';
import '../../dist/modus-web-components/modus-web-components.css';

defineCustomElements();

// get channel to listen to event emitter
const channel = addons.getChannel();


export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
Expand All @@ -28,10 +25,10 @@ export const parameters = {
current: 'light',
// Override the default dark theme
dark: { ...themes.dark, appBg: '#252a2e' },
stylePreview: true
stylePreview: true,
},
backgrounds: {
disable: true
disable: true,
},
docs: {
theme: yourTheme,
Expand All @@ -40,15 +37,14 @@ export const parameters = {
storySort: {
order: [
'Introduction',
['Welcome', 'Getting Started', 'Contributing'],
['Welcome', 'Getting Started', 'Accessibility', 'Contributing'],
'Components',
'User Inputs',
'Framework Integrations'
]
}
'Framework Integrations',
],
},
},
previewTabs: {
'storybook/docs/panel': { index: -1 },
}
}

},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { Meta } from '@storybook/addon-docs';

<Meta
title="Introduction/Accessibility"
parameters={{
previewTabs: {
canvas: {
hidden: true,
},
},
options: {
isToolshown: false,
},
viewMode: 'docs',
}}
/>

# Accessibility

The Modus Web Components package is designed to be accessible by default. This means that the components are built with accessibility in mind and are tested to ensure they meet the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/WAI/standards-guidelines/wcag/).

Features:

- Meet [minimum contrast requirements (Level AA)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html).
- Keyboard navigable where applicable.
- Screen reader accessible.
- Optimized and tested to work with [Windows High Contrast themes](https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/).
- Supports the [prefers-reduced-motion media query](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) to minimize the amount of non-essential motion.

Found an accessibility issue? Please [report it at GitHub](https://github.com/trimble-oss/modus-web-components/issues/new?assignees=&labels=accessibility&template=accessibility-issue-report.md&title=).

## For contributors

The Storybook site has an Accessibility tab that can be used to test the components for accessibility issues. If you are contributing to the Modus Web Components package please ensure that your changes do not introduce accessibility issues. If there are any violations please address them before submitting your changes. If you are unsure, please reach out to the team for guidance.

## Useful tools for testing your sites

### Browser extensions

- [axe DevTools](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd)
- [Lighthouse](https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk)
- [Microsoft Accessibility Insights](https://accessibilityinsights.io/downloads/)

## Further Reading

You can find more information on accessibility on the [Modus website](https://modus.trimble.com/foundations/accessibility).

0 comments on commit 8050718

Please sign in to comment.