Special choice
<forma-special-choice>
Unknown, not-applicable, and other non-scale answers visually separated from the primary continuum.
- Authoring tag
<forma-special-choice>- Category
- Assessment and survey
- Behavior owner
- Native HTML
- Canonical source
patterns/special-choice.html
Purpose
Special choices are answers that are not positions on the main scale: Don't know, Not applicable, Prefer not to say. They render as bordered pill radios in a row set apart by a dashed rule, so they are never read as an extra point at the end of a continuum. When they are mutually exclusive with the primary answer they share its radio name; the application decides what each one means for scoring and completion. .forma-special-choice-group is the fieldset wrapper for using the row on its own.
Use when
- A scale or choice question needs Don't know, Not applicable or Prefer not to say as legitimate answers.
- Those answers must stay semantically distinct from the lowest or middle scale value.
- A response status is asked on its own, separate from any scale.
Avoid when
- The option is an ordinary category among equals: use Choice group.
- The option must clear other selections in a multi-select: use the exclusive option in Multi-choice.
- The answer is an ordered position: put it in the Ordinal scale itself.
Behavior to know
- Dashed top rule and spacing separate the row from the primary options above it.
- Each pill is a label with a visually hidden radio, at least 44px tall.
- Pills wrap onto new lines on narrow screens.
- Selection uses the inverse surface, the same cue as the primary options.
Basic example
The smallest correct markup: the canonical pattern from patterns/special-choice.html inside its public tag. Copy this first, then adapt labels, names and state.
Minimal special choice
Rendered from the canonical pattern file.
<forma-special-choice class="forma-component-tag">
<fieldset class="forma-special-choice-group">
<legend class="forma-field__label">Response status</legend>
<p class="forma-field__description">Use these only when they are semantically different from the response scale.</p>
<div class="forma-special-choices">
<label class="forma-special-choice">
<input type="radio" name="response-status" value="unknown">
<span>Don't know</span>
</label>
<label class="forma-special-choice">
<input type="radio" name="response-status" value="na">
<span>Not applicable</span>
</label>
</div>
</fieldset>
</forma-special-choice>
Click or tap the code once to select all of it, then copy.
Examples
Prefer not to say after choice cards
A demographic question with ordinary choice cards and a Prefer not to say answer that shares the radio name. The special row sits inside the same fieldset, below a dashed rule.
<forma-special-choice class="forma-component-tag">
<fieldset class="forma-choice-group">
<legend class="forma-choice-group__legend">How many years have you worked in operations?</legend>
<label class="forma-choice"><input type="radio" name="special-cards-tenure" value="0-2" required><span class="forma-choice__content"><strong>0 to 2 years</strong></span></label>
<label class="forma-choice"><input type="radio" name="special-cards-tenure" value="3-9"><span class="forma-choice__content"><strong>3 to 9 years</strong></span></label>
<label class="forma-choice"><input type="radio" name="special-cards-tenure" value="10+"><span class="forma-choice__content"><strong>10 years or more</strong></span></label>
<div class="forma-special-choices" aria-label="Other responses">
<label class="forma-special-choice"><input type="radio" name="special-cards-tenure" value="declined"><span>Prefer not to say</span></label>
</div>
</fieldset>
</forma-special-choice>
Click or tap the code once to select all of it, then copy.
Not applicable selected
A standalone response-status group with Not applicable checked and one option disabled because the application has ruled it out for this respondent.
<forma-special-choice class="forma-component-tag">
<fieldset class="forma-special-choice-group" aria-describedby="special-selected-help">
<legend class="forma-field__label">Status of the on-call handbook question</legend>
<p class="forma-field__description" id="special-selected-help">Don't know is unavailable because you own the handbook.</p>
<div class="forma-special-choices">
<label class="forma-special-choice"><input type="radio" name="special-selected-handbook" value="unknown" disabled><span>Don't know</span></label>
<label class="forma-special-choice"><input type="radio" name="special-selected-handbook" value="na" checked><span>Not applicable</span></label>
</div>
</fieldset>
</forma-special-choice>
Click or tap the code once to select all of it, then copy.
Mobile
Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.
Several special answers on a phone
Three special answers with a long label at phone width. Pills wrap to new lines; each keeps its full label.
What changes at narrow widths
.forma-special-choicesis a wrapping flex row, so pills move to the next line instead of shrinking.- Each pill keeps a 2.75rem (44px) minimum height and the whole pill is the tap target.
- A long label wraps inside its pill when it is wider than the row.
- The dashed separator spans the full width at every size.
<forma-special-choice class="forma-component-tag">
<fieldset class="forma-special-choice-group">
<legend class="forma-field__label">If you cannot rate the vendor, tell us why</legend>
<div class="forma-special-choices">
<label class="forma-special-choice"><input type="radio" name="special-mobile-vendor" value="unknown"><span>Don't know</span></label>
<label class="forma-special-choice"><input type="radio" name="special-mobile-vendor" value="na"><span>Not applicable</span></label>
<label class="forma-special-choice"><input type="radio" name="special-mobile-vendor" value="no-contact"><span>I have not worked with this vendor in the last year</span></label>
</div>
</fieldset>
</forma-special-choice>
Click or tap the code once to select all of it, then copy.
Mobile · 320px
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
API and configuration
Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.
| Attribute | On | Values | Default | Description |
|---|---|---|---|---|
type | input | radio | — | Radios, because special answers are mutually exclusive with each other and usually with the scale. |
name | input | string | — | Share the primary question's name when the special answer replaces a scale answer; use a separate name only when both can coexist. |
value | input | string such as unknown or na | — | Submitted value. The application decides how it affects scoring and completion. |
required | first input of the group | boolean | absent | Native required-group validation when the status must be given. |
checked | input | boolean | absent | Restores a saved special answer. |
disabled | input | boolean | absent | Removes a special answer from focus and submission; explain why in text. |
aria-label | .forma-special-choices | string | — | Names the row when it sits inside a larger fieldset, for example Other responses. |
aria-describedby | fieldset | id list | — | Associates help text with the group. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-special-choice | Block class | — | Bordered pill label containing a visually hidden radio. At least 44px tall. |
.forma-special-choice-group | Block class | — | Fieldset wrapper for a standalone group of special answers, with browser border and padding removed. |
.forma-special-choices | Block class | — | Wrapping row separated from the content above by spacing and a dashed rule. |
| Keys | Result |
|---|---|
| Tab / Shift+Tab | Moves focus into and out of the radio group the special answers belong to. |
| Arrow keys | Native radio behavior; when the name is shared, arrows move between scale positions and special answers in document order. |
| Space | Selects the focused answer when none is checked. |
| Event | Description |
|---|---|
input / change | Native events from the checked radio. |
Form behavior
Submits name=value like any radio. When the name is shared with a scale, choosing a special answer clears the scale answer natively.
States
| State | How it is expressed | Presentation |
|---|---|---|
| Unselected | no checked attribute | Neutral bordered pill. |
| Selected | :checked | Inverse surface and text color. |
| Focus | :focus-visible on the radio | Two-tone focus ring around the pill. |
| Disabled | disabled attribute | Reduced opacity and not-allowed cursor; skipped by keyboard and not submitted. |
Accessibility
Forma provides
- Keeps special answers as native radios with visible text labels.
- Separates them from the continuum with a non-color dashed rule and spacing.
- Uses Highlight/HighlightText for the selected pill in forced-colors mode.
Your application supplies
- Name the row with aria-label when it sits inside another fieldset.
- Decide in application logic whether a special answer counts as complete and how it is scored.
- Explain disabled special answers in visible text.
Responsive behavior
- The row is a wrapping flex container with a 0.5rem gap.
- Pills size to their text and wrap long labels; they never force horizontal overflow.
- No breakpoints; spacing is constant.
Motion
- Background, border and text color use the shared perceptual interpolation (about 120ms) on selection, the same timing as the scale options. Selection is immediate.
- Under
prefers-reduced-motion: reducethe foundation makes these transitions effectively instant.
Usage guidance
Do
- Use plain labels such as Don't know, Not applicable or Prefer not to say.
- Share the radio name with the scale when the answers are mutually exclusive.
Avoid
- Appending Don't know as the last scale position.
- Offering special answers that the application treats identically to a scale value.
Verification specimens
Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.