Ready

Checkbox

Checkboxes allow users to select/deselect an item or items from a list. A checkable input communicates if an option is true, false, or indeterminate. They can be used to make any number of choices, including zero, one, or several. Checkboxes must include a clear, contextual label to help the user make their selection.

Ready

Checkbox

Checkboxes allow users to select/deselect an item or items from a list. A checkable input communicates if an option is true, false, or indeterminate. They can be used to make any number of choices, including zero, one, or several. Checkboxes must include a clear, contextual label to help the user make their selection.

Ready

Checkbox

Checkboxes allow users to select/deselect an item or items from a list. A checkable input communicates if an option is true, false, or indeterminate. They can be used to make any number of choices, including zero, one, or several. Checkboxes must include a clear, contextual label to help the user make their selection.

Variants

  1. Checkbox

  2. Checkbox Group

States

Unchecked

  1. Default

  2. Hover

  3. Disabled

  4. Error

Checked

  1. Default

  2. Hover

  3. Disabled

Indeterminate

  1. Default

  2. Hover

  3. Disabled

Best Practices

1. States

Checkboxes are either unselected or selected. The checkbox can have an additional, "indeterminate" state if they they use a hierarchical structure. Clicking on a checkbox in an indeterminate state sets the state of that checkbox, and all other controls affected by it, to the "selected" state.

2. Checkboxes vs Dropdowns

Use Checkboxes over Multi-select Dropdowns where space permits. This allows all options to be visible to the user, who can easily compare them.¹

3. Positive and Active

Use positive and active wording for checkbox labels, so that it's clear what will happen if the user turns on the checkbox. Avoid negations which would mean that the user would have to check the box in order for something not to happen. Opt-in scenarios should also be unchecked by default.¹

4. Click area

Users should be able to select an option by clicking on the Checkbox or the label associated with it. A larger target area helps prevent user error and allows them to quickly execute their tasks.¹

5. Disabled States

Use our new disabled styling on Checkboxes and don’t change the opacity to indicate a disabled state. The old styling was not AA compliant and made it difficult for the user to tell that something was intentionally greyed out and disabled.²

More

Related Pages

Accessibility

Color contrast ratio for our Radio Buttons meets AA standards, based on Web Content Accessibility Guidelines (WCAG) guidelines.

Benefits: People with low vision often have difficulty reading text that does not contrast with its background. This can be exacerbated if the person has a color vision deficiency that lowers the contrast even further. Providing a minimum luminance contrast ratio between the text and its background can make the text more readable even if the person does not see the full range of colors. It also works for the rare individuals who see no color.²  

Developer Guidelines

  1. States and attributes

    1. Convey the state of the checkbox automatically.³

    2. Use the disabled prop to apply the HTML disabled attribute to the checkbox <input>. This prevents users from being able to interact with the checkbox, and conveys its inactive state to assistive technologies.³

    3. Setting value="indeterminate" conveys the state of the checkbox.³

  2. Labeling

    1. The required label element conveys the purpose of the checkbox to all users.³

    2. The label must have a for attribute with a value that matches the unique id attribute of its associated radio <input>.³

  3. Keyboard support

    1. Move focus to each checkbox using the tab key (or shift + tab when tabbing backwards).³

    2. To interact with the checkbox when it has keyboard focus, press the space key.³

Additional Reading

  1. World Leaders in Research-Based User Experience. “Checkboxes vs. Radio Buttons.” Nielsen Norman Group, www.nngroup.com/articles/checkboxes-vs-radio-buttons/.

  2. “Web Content Accessibility Guidelines (WCAG) 2.0.” W3C, www.w3.org/TR/WCAG20/.

  3. “Checkbox.” Shopify Polaris, polaris.shopify.com/components/forms/checkbox

  4. World Leaders in Research-Based User Experience. “Toggle-Switch Guidelines.” Nielsen Norman Group, www.nngroup.com/articles/toggle-switch-guidelines/.

© 2024 Basis Technologies
© 2024 Basis Technologies
© 2024 Basis Technologies