The Parsley Design System has been created to conform with the Web Content Accessibility Guidelines (WCAG) 2.2 at Level A & AA, and Level AAA where possible.
Product teams must apply the following accessibility best practices when creating content, design or development.
Content
- Always use plain english.
- Use a font that's easy to read.
- Write unique page titles.
- Use headings to structure your content.
- Use descriptive text for links.
- Use plain language and avoid figures of speech, idioms, and complicated metaphors.
- Make sure that button, a, and label element content is unique and descriptive.
- Use left-aligned text for left-to-right (LTR) languages, and right-aligned text for right-to-left (RTL) languages.
- Always add text alternatives (alt text) to images
- Use tables only for tabular data
Design
- Provide sufficient contrast between foreground and background.
- Don’t use color alone to convey information.
- Ensure that interactive elements are easy to identify.
- Provide clear and consistent navigation options.
- Ensure that form elements include clearly associated labels.
- Provide easily identifiable feedback.
- Use headings and spacing to group related content.
- Create designs for different viewport sizes.
- Include image and media alternatives in your design.
- Provide controls for content that starts automatically.
- Keep navigation predictable and consistent.
- Avoid unexpected changes in context.
- All content should be navigable with a keyboard.
- Interface elements should be a minimum of 24 square pixels.
- Avoid complex interactions, or provide simpler alternatives.
- Use meaningful headings that convey page structure.
- Keep design responsive, and make sure text remains legible when users zoom in.
- Mobile content should be legible in portrait and landscape orientation.
- Use plain language, free from technical jargon.
- Minimum 16px body copy size.
- Purpose of links should be clear from link text alone.
- Don’t rely on color alone to communicate information.
- Color contrast ratio should be at least 3:1 for large text, and 4.5:1 for body copy.
- Animations should never flash more than 3 times per second.
- Allow users to disable distracting content.
- Provide text alternatives to all images.
- Don’t use an image where text belongs.
- Provide captions and transcripts for audio and video.
- Avoid using autostart, which can interfere with screen reader performance.
- Errors should be easy to spot and correct.
- Allow users to adjust or disable time limits.
- Provide labels, and not just placeholder text, for all input fields.
Development
- Always add text alternatives (alt text) to images.
- Use tables only for tabular data.
- Use the table element to describe tabular data.
- Use the th element for table headers with appropriate scope attributes.
- Use the caption element to provide a title for the table.
- Validate all HTML.
- Use a lang attribute on the html element.
- Provide a unique title for each page or view.
- Ensure that viewport zoom is not disabled.
- Use landmark elements to indicate important content regions.
- Ensure a linear content flow.
- Avoid using the autofocus attribute.
- Allow extending session timeouts.
- Remove title attribute tooltips.
- Make sure there is a visible focus style for interactive elements that are navigated to via keyboard input.
- Check to see that keyboard focus order matches the visual layout.
- Remove invisible focusable elements.
- Make sure that all img elements have an alt attribute.
- Make sure that decorative images use null alt (empty) attribute values.
- Provide a text alternative for complex images such as charts, graphs, and maps.
- For images containing text, make sure the alt description includes the image's text.
- Use heading elements to introduce content.
- Use only one h1 element per page or view.
- Heading elements should be written in a logical sequence.
- Don't skip heading levels.
- Use list elements (ol, ul, and dl elements) for list content.
- Use the a element for links.
- Ensure that links are recognizable as links.
- Ensure that controls have :focus states.
- Use the button element for buttons.
- Provide a skip link and make sure that it is visible when focused.
- Identify links that open in a new tab or window.
- All inputs in a form are associated with a corresponding label element.
- Use fieldset and legend elements where appropriate.
- Inputs use autocomplete where appropriate.
- Make sure that form input errors are displayed in list above the form after submission.
- Associate input error messaging with the input it corresponds to.
- Make sure that error, warning, and success states are not visually communicated by just color.
- Make sure that media does not autoplay.
- Ensure that media controls use appropriate markup.
- Check to see that all media can be paused.
- Remove seizure triggers.
- Confirm that transcripts are available.
- Check your content in specialized browsing modes.
- Increase text size to 200%.
- Check that good proximity between content is maintained.
- Make sure color isn't the only way information is conveyed.
- Make sure instructions are not visual or audio-only.
- Use a simple, straightforward, and consistent layout.
- Ensure animations are subtle and do not flash too much.
- Provide a mechanism to pause background video.
- Make sure all animation obeys the prefers-reduced-motion media query.
- Check the contrast for all normal-sized text.
- Check the contrast for all large-sized text.
- Check the contrast for all icons.
- Check the contrast of borders for input elements (text input, radio buttons, checkboxes, etc.).
- Check text that overlaps images or video.
- Check custom ::selection colors.
- Check that the site can be rotated to any orientation.
- Remove horizontal scrolling.
- Ensure that button and link icons can be activated with ease.
- Ensure sufficient space between interactive items in order to provide a scroll area.