--- title: Image check order: 6 summary: Checkboxes and radios that use an image as the label, for picking a template, a theme or a product. description: Checkboxes and radios with an image as the label, for choosing templates, themes or products in a form. related: [/ui/forms/select-group, /ui/forms/color-check] --- import Example from '@components/Example.astro'; ## Default markup An image check is a `.form-imagecheck` label with a hidden `.form-imagecheck-input`, a `.form-imagecheck-figure` that draws the check mark, and a `.form-imagecheck-image` for the picture. ```html ```
## Radio buttons Change the input type to `radio` when only one option can be picked.
## Avatars Use an [avatar](/ui/components/avatar) instead of an image when the options are people.
## Accessibility - An image check is a checkbox or a radio with a picture as its label. Keep the `input` in the markup so the control works and the state is exposed. - A picture is not a name. Add text in the label, or an `aria-label` on the input, saying what the option is. - Selection must not rest on the border color alone. Add a checkmark or another visible mark for the selected state. - Wrap a set of them in a `fieldset` with a `legend`, so the group has a name.