Assessment and survey

Special choice

<forma-special-choice>

Unknown, not-applicable, and other non-scale answers visually separated from the primary continuum.

Authoring tag
<forma-special-choice>
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.

Canonical

Minimal special choice

Rendered from the canonical pattern file.

Response status

Use these only when they are semantically different from the response scale.

HTML · Minimal special choice Raw HTML for HTML · Minimal special choice
<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

Scenario

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.

How many years have you worked in operations?
HTML · Prefer not to say after choice cards Raw HTML for HTML · Prefer not to say after choice cards
<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.

Scenario

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.

Status of the on-call handbook question

Don't know is unavailable because you own the handbook.

HTML · Not applicable selected Raw HTML for HTML · Not applicable selected
<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.

Mobile example

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.

Viewport width

Frames narrower than the selected width show the component at the width available.

What changes at narrow widths

  • .forma-special-choices is 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.
HTML · Several special answers on a phone Raw HTML for HTML · Several special answers on a phone
<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.

Baseline

Mobile · 320px

The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.

Viewport width

Frames narrower than the selected width show the component at the width available.

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.

Native and ARIA attributes
AttributeOnValuesDefaultDescription
typeinputradio—Radios, because special answers are mutually exclusive with each other and usually with the scale.
nameinputstring—Share the primary question's name when the special answer replaces a scale answer; use a separate name only when both can coexist.
valueinputstring such as unknown or na—Submitted value. The application decides how it affects scoring and completion.
requiredfirst input of the groupbooleanabsentNative required-group validation when the status must be given.
checkedinputbooleanabsentRestores a saved special answer.
disabledinputbooleanabsentRemoves a special answer from focus and submission; explain why in text.
aria-label.forma-special-choicesstring—Names the row when it sits inside a larger fieldset, for example Other responses.
aria-describedbyfieldsetid list—Associates help text with the group.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-special-choiceBlock class—Bordered pill label containing a visually hidden radio. At least 44px tall.
.forma-special-choice-groupBlock class—Fieldset wrapper for a standalone group of special answers, with browser border and padding removed.
.forma-special-choicesBlock class—Wrapping row separated from the content above by spacing and a dashed rule.
Keyboard interaction
KeysResult
Tab / Shift+TabMoves focus into and out of the radio group the special answers belong to.
Arrow keysNative radio behavior; when the name is shared, arrows move between scale positions and special answers in document order.
SpaceSelects the focused answer when none is checked.
Events
EventDescription
input / changeNative 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

Special choice states
StateHow it is expressedPresentation
Unselectedno checked attributeNeutral bordered pill.
Selected:checkedInverse surface and text color.
Focus:focus-visible on the radioTwo-tone focus ring around the pill.
Disableddisabled attributeReduced 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: reduce the 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.