Skip to content

Accessibility

A person should be able to do everything in Werklist with a keyboard or a screen reader, and read it at twice the text size. These rules set the minimum a screen meets before it ships.

Contrast

4.5 to 1

Text needs 4.5 to 1 against what is behind it, in both themes. A large heading gets no lower floor.

UseLightDark
Supporting text on a control fill--text-muted on --surface-control
Updated today
4.50 to 1
Updated today
6.92 to 1

3.5 to 1

The word on a status chip is the one exception. It needs 3.5 to 1 on its tint, so the ink can keep the hue of its chip.

UseLightDark
Warning on a control fill--warning-ink on its tint over --surface-control
Needs review
4.42 to 1
Needs review
4.91 to 1
Information on a control fill--brand-ink on its tint over --surface-control
Scheduled
5.63 to 1
Scheduled
3.79 to 1

3 to 1

Icons that carry meaning, the focus ring and chart marks need 3 to 1. People recognize a shape at a lower contrast than they need to read a letter.

UseLightDark
Focus ring on a control fill--focus-ring on --surface-control
4.58 to 1
5.73 to 1

Check both themes. White text on --brand-blue reads 5.44 to 1 in light and 3.67 to 1 in dark.

More than color

Pair color with a word, an icon or a shape: a status has its word, an error its message and icon, and a chart series its label.

Underline links inside running text. Against body text, blue link text reaches only 2.36 to 1 in light and 2.72 to 1 in dark, too little to find by color.

Enter an email address, such as name@company.com

Read the writing guide before you name a status.

Focus

A control that receives keyboard focus shows the ring. It appears on :focus-visible, so a mouse click does not draw it, and it is not removed unless something as visible replaces it. A control that takes focus is never hidden under the sticky header.

Draw the ring as an outline, not a shadow: in Windows high contrast the browser repaints outlines in the system color and drops shadows. The gap keeps the ring off the control's own fill, where a blue ring on a blue button would disappear.

Color
light #1863dc, dark #7fb3ff
--focus-ring
Width
2 px
--focus-ring-width
Gap
2 px
--focus-ring-offset
Ring on a panel
light 5.44 to 1, dark 7.87 to 1
--focus-ring on --surface-1

Keyboard

Everything a pointer can do, a keyboard can do, and a swipe always has a button that does the same. Focus moves in reading order, left to right and top to bottom. When a menu or a dialog closes, focus returns to the control that opened it.

The first stop on a page is a link that skips to the main content.

Tab, Shift+Tab
Next or previous control
Enter
Follow a link, press a button, submit a form
Space
Press a button, check a checkbox, turn a switch on or off
Arrow keys
Move inside a group, such as tabs or a menu
Home, End
First or last item of a menu or a list
Escape
Close the front menu, popover or dialog and return focus

Target size

A target is the area that answers a click or a tap, and it can be larger than what is drawn.

Small icon button, 32 px
Small button, 36 px
Button, 44 px
Touch
44 by 44 px
@media (pointer: coarse)
Mouse and trackpad
24 by 24 px
@media (pointer: fine)

Text size and zoom

Body text is 16 px and the smallest text, a caption, is 13 px. On a touch screen any text a person edits is at least 16 px, or iOS zooms the page when the field receives focus.

Do not turn zoom off with maximum-scale or user-scalable=no. At 320 px wide, the width of a 1280 px window at 400 percent zoom, the page reflows into one column with no sideways scrolling. Text enlarged to 200 percent does not clip or overlap.

Names and structure

A page has one h1, and its headings descend in order. The header, the navigation, the main content and the footer are landmarks a screen reader can jump between.

Each control has a name a screen reader announces. A count on a control joins that name, as in “Notifications, 3 unread”, and the number itself is hidden from the reader.

When content changes and focus stays put, such as a saved confirmation, announce it in a polite live region. An error that stops the task uses an alert.

Motion and time

When a person asks their system for reduced motion, slides and scales become instant and fades stay.

Nothing a person has to read or act on disappears on a timer. A message with an action stays until the person dismisses it.

Permitted and not permitted

Permitted

  • Replace the browser's outline with --focus-ring.

  • Label each field with visible text above it.

  • Show hover actions on focus as well.

Not permitted

  • Set outline: none with nothing in its place.

    A keyboard user loses their place.

  • Use the placeholder as the label.

    It disappears as soon as the person types.

  • Reveal an action on hover only.

    A keyboard or a touch screen cannot reach it.

NextWriting

Accessibility

The minimum a Werklist screen meets for contrast, focus, keyboard, target size, zoom, names, structure and motion, in both themes.

  • Kind: foundation
  • Page: https://design.werklist.com/foundations/accessibility
  • Version: 2.1.2

Rules

  • Text meets 4.5 to 1 against what is behind it in both themes. A large heading gets no lower floor.
  • The one exception is the word on a status chip: 3.5 to 1 on its tint, so the ink can keep the hue of its chip.
  • Icons that carry meaning, the focus ring and chart marks meet 3 to 1.
  • Check every pair in both themes: white text on --brand-blue reads 5.44 to 1 in light and 3.67 to 1 in dark.
  • Color is paired with a word, an icon or a shape: a status has its word, an error its message and icon, a chart series its label.
  • Links in running text are underlined: --brand-ink against --text is 2.36 to 1 in light and 2.72 to 1 in dark.
  • The focus ring appears on :focus-visible and is removed only when something as visible replaces it.
  • A control that takes focus is never hidden under the sticky header.
  • Focus is drawn as an outline, not a shadow: in forced colors the browser keeps outlines and drops shadows. The gap keeps a blue ring off a blue button.
  • Everything a pointer can do, a keyboard can do, and a swipe always has a button that does the same.
  • Focus moves in reading order. When a menu or a dialog closes, focus returns to the control that opened it.
  • The first stop on a page is a link that skips to the main content.
  • Zoom is never turned off with maximum-scale or user-scalable=no.
  • At 320 px wide the page reflows into one column with no sideways scrolling. Text enlarged to 200 percent does not clip or overlap.
  • A page has one h1, and its headings descend in order. The header, the navigation, the main content and the footer are landmarks.
  • Each control has a name a screen reader announces. A count joins that name, as in "Notifications, 3 unread", and the number itself is hidden from the reader.
  • A change announced while focus stays put uses a polite live region. An error that stops the task uses an alert.
  • With reduced motion, slides and scales become instant and fades stay.
  • Nothing a person has to read or act on disappears on a timer. A message with an action stays until it is dismissed.
  • A field has visible text above it as its label, never only a placeholder.
  • An action shown on hover is shown on focus too.

Anatomy

  • Focus ring color: light #1863dc, dark #7fb3ff (--focus-ring)
  • Focus ring width: 2px in both themes (--focus-ring-width)
  • Focus ring gap: 2px in both themes (--focus-ring-offset)
  • Touch target: 44 by 44 px under @media (pointer: coarse)
  • Mouse and trackpad target: 24 by 24 px under @media (pointer: fine)
  • Body text: 16 px
  • Caption, the smallest text: 13 px
  • Editable text on a touch screen: 16 px minimum

Keyboard

  • Tab, Shift+Tab: Next or previous control
  • Enter: Follow a link, press a button, submit a form
  • Space: Press a button, check a checkbox, turn a switch on or off
  • Arrow keys: Move inside a group, such as tabs or a menu
  • Home, End: First or last item of a menu or a list
  • Escape: Close the front menu, popover or dialog and return focus

JSON

{
  "title": "Accessibility",
  "path": "/foundations/accessibility",
  "url": "https://design.werklist.com/foundations/accessibility",
  "text": "https://design.werklist.com/agent/foundations/accessibility",
  "summary": "The rules a screen meets before it ships: contrast, focus, keyboard, target size, zoom, names and motion.",
  "version": "2.1.2",
  "kind": "foundation",
  "name": "Accessibility",
  "purpose": "The minimum a Werklist screen meets for contrast, focus, keyboard, target size, zoom, names, structure and motion, in both themes.",
  "anatomy": [
    {
      "part": "Focus ring color",
      "token": "--focus-ring",
      "measure": "light #1863dc, dark #7fb3ff"
    },
    {
      "part": "Focus ring width",
      "token": "--focus-ring-width",
      "measure": "2px in both themes"
    },
    {
      "part": "Focus ring gap",
      "token": "--focus-ring-offset",
      "measure": "2px in both themes"
    },
    {
      "part": "Touch target",
      "measure": "44 by 44 px under @media (pointer: coarse)"
    },
    {
      "part": "Mouse and trackpad target",
      "measure": "24 by 24 px under @media (pointer: fine)"
    },
    {
      "part": "Body text",
      "measure": "16 px"
    },
    {
      "part": "Caption, the smallest text",
      "measure": "13 px"
    },
    {
      "part": "Editable text on a touch screen",
      "measure": "16 px minimum"
    }
  ],
  "keys": [
    {
      "key": "Tab, Shift+Tab",
      "action": "Next or previous control"
    },
    {
      "key": "Enter",
      "action": "Follow a link, press a button, submit a form"
    },
    {
      "key": "Space",
      "action": "Press a button, check a checkbox, turn a switch on or off"
    },
    {
      "key": "Arrow keys",
      "action": "Move inside a group, such as tabs or a menu"
    },
    {
      "key": "Home, End",
      "action": "First or last item of a menu or a list"
    },
    {
      "key": "Escape",
      "action": "Close the front menu, popover or dialog and return focus"
    }
  ],
  "rules": [
    "Text meets 4.5 to 1 against what is behind it in both themes. A large heading gets no lower floor.",
    "The one exception is the word on a status chip: 3.5 to 1 on its tint, so the ink can keep the hue of its chip.",
    "Icons that carry meaning, the focus ring and chart marks meet 3 to 1.",
    "Check every pair in both themes: white text on --brand-blue reads 5.44 to 1 in light and 3.67 to 1 in dark.",
    "Color is paired with a word, an icon or a shape: a status has its word, an error its message and icon, a chart series its label.",
    "Links in running text are underlined: --brand-ink against --text is 2.36 to 1 in light and 2.72 to 1 in dark.",
    "The focus ring appears on :focus-visible and is removed only when something as visible replaces it.",
    "A control that takes focus is never hidden under the sticky header.",
    "Focus is drawn as an outline, not a shadow: in forced colors the browser keeps outlines and drops shadows. The gap keeps a blue ring off a blue button.",
    "Everything a pointer can do, a keyboard can do, and a swipe always has a button that does the same.",
    "Focus moves in reading order. When a menu or a dialog closes, focus returns to the control that opened it.",
    "The first stop on a page is a link that skips to the main content.",
    "Zoom is never turned off with maximum-scale or user-scalable=no.",
    "At 320 px wide the page reflows into one column with no sideways scrolling. Text enlarged to 200 percent does not clip or overlap.",
    "A page has one h1, and its headings descend in order. The header, the navigation, the main content and the footer are landmarks.",
    "Each control has a name a screen reader announces. A count joins that name, as in \"Notifications, 3 unread\", and the number itself is hidden from the reader.",
    "A change announced while focus stays put uses a polite live region. An error that stops the task uses an alert.",
    "With reduced motion, slides and scales become instant and fades stay.",
    "Nothing a person has to read or act on disappears on a timer. A message with an action stays until it is dismissed.",
    "A field has visible text above it as its label, never only a placeholder.",
    "An action shown on hover is shown on focus too."
  ]
}

Raw file: https://design.werklist.com/agent/foundations/accessibility