Assessment and survey

Ordinal scale

<forma-ordinal-scale>

One radio-backed contract for ordered Likert, agreement, confidence, frequency, and similar scales.

Authoring tag
<forma-ordinal-scale>
Behavior owner
Native HTML
Canonical source
patterns/ordinal-scale.html

Purpose

An ordinal scale asks the user to pick one position on an ordered set of 3 to 11 answers. It is a native radio group inside a fieldset; each option shows a numbered marker and a text label, and the options form one continuous bordered row. Likert, agreement, frequency, confidence, maturity and NPS are label presets over this single structure, not separate components. Forma attaches no score or direction to position: the application maps each value to meaning.

Use when

  • The answers are ordered steps such as Strongly disagree to Strongly agree, Never to Always, or 0 to 10.
  • Every position needs its own visible or programmatic label.
  • Don't know or Not applicable must be offered without becoming extra points on the scale.

Avoid when

Behavior to know

  • Cardinality modifiers (--3, --4, --5, --6, --7, --10, --11) set the column count; the default is five.
  • Special answers live in .forma-special-choices below a dashed rule and may share the radio name.
  • Options become a vertical list of full-width rows below 44rem, so labels never have to shrink to fit.
  • In the narrow layout, each label block is vertically centered beside its numbered marker, including wrapped labels.
  • Even-point scales have no implied midpoint; visual order does not imply score.

Basic example

The smallest correct markup: the canonical pattern from patterns/ordinal-scale.html inside its public tag. Copy this first, then adapt labels, names and state.

Canonical

Minimal ordinal scale

Rendered from the canonical pattern file.

Our deployment process is predictable.
HTML · Minimal ordinal scale Raw HTML for HTML · Minimal ordinal scale
<forma-ordinal-scale class="forma-component-tag">
<fieldset class="forma-ordinal-scale forma-ordinal-scale--5">
  <legend class="forma-ordinal-scale__legend">Our deployment process is predictable.</legend>

  <div class="forma-ordinal-scale__options">
    <label class="forma-ordinal-option">
      <input type="radio" name="deployment-predictability" value="0" required>
      <span class="forma-ordinal-option__marker" aria-hidden="true">1</span>
      <span class="forma-ordinal-option__label">Strongly disagree</span>
    </label>
    <label class="forma-ordinal-option">
      <input type="radio" name="deployment-predictability" value="1">
      <span class="forma-ordinal-option__marker" aria-hidden="true">2</span>
      <span class="forma-ordinal-option__label">Disagree</span>
    </label>
    <label class="forma-ordinal-option">
      <input type="radio" name="deployment-predictability" value="2">
      <span class="forma-ordinal-option__marker" aria-hidden="true">3</span>
      <span class="forma-ordinal-option__label">Neither agree nor disagree</span>
    </label>
    <label class="forma-ordinal-option">
      <input type="radio" name="deployment-predictability" value="3">
      <span class="forma-ordinal-option__marker" aria-hidden="true">4</span>
      <span class="forma-ordinal-option__label">Agree</span>
    </label>
    <label class="forma-ordinal-option">
      <input type="radio" name="deployment-predictability" value="4">
      <span class="forma-ordinal-option__marker" aria-hidden="true">5</span>
      <span class="forma-ordinal-option__label">Strongly agree</span>
    </label>
  </div>

  <div class="forma-special-choices" aria-label="Other responses">
    <label class="forma-special-choice">
      <input type="radio" name="deployment-predictability" value="unknown">
      <span>Don't know</span>
    </label>
    <label class="forma-special-choice">
      <input type="radio" name="deployment-predictability" value="na">
      <span>Not applicable</span>
    </label>
  </div>
</fieldset>
</forma-ordinal-scale>

Click or tap the code once to select all of it, then copy.

Examples

Scenario

0 to 10 likelihood (NPS-style)

An eleven-point presentation using the --11 modifier. Only the endpoints have visible words; the middle positions carry their number as screen-reader text because the marker is decorative.

How likely are you to recommend this service to a colleague?
HTML · 0 to 10 likelihood (NPS-style) Raw HTML for HTML · 0 to 10 likelihood (NPS-style)
<forma-ordinal-scale class="forma-component-tag">
  <fieldset class="forma-ordinal-scale forma-ordinal-scale--11">
    <legend class="forma-ordinal-scale__legend">How likely are you to recommend this service to a colleague?</legend>
    <div class="forma-ordinal-scale__options">
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="0" required><span class="forma-ordinal-option__marker" aria-hidden="true">0</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">0, </span>Not at all likely</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="1"><span class="forma-ordinal-option__marker" aria-hidden="true">1</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">1</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="2"><span class="forma-ordinal-option__marker" aria-hidden="true">2</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">2</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="3"><span class="forma-ordinal-option__marker" aria-hidden="true">3</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">3</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="4"><span class="forma-ordinal-option__marker" aria-hidden="true">4</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">4</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="5"><span class="forma-ordinal-option__marker" aria-hidden="true">5</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">5</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="6"><span class="forma-ordinal-option__marker" aria-hidden="true">6</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">6</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="7"><span class="forma-ordinal-option__marker" aria-hidden="true">7</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">7</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="8"><span class="forma-ordinal-option__marker" aria-hidden="true">8</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">8</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="9"><span class="forma-ordinal-option__marker" aria-hidden="true">9</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">9</span></span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-nps-recommend" value="10"><span class="forma-ordinal-option__marker" aria-hidden="true">10</span><span class="forma-ordinal-option__label"><span class="forma-sr-only">10, </span>Extremely likely</span></label>
    </div>
  </fieldset>
</forma-ordinal-scale>

Click or tap the code once to select all of it, then copy.

Scenario

Four-point maturity with a saved answer

An even scale with no midpoint, restored from a saved draft with Established checked. The labels are a maturity preset over the same structure, not a separate component.

How mature is incident post-review in your team?
HTML · Four-point maturity with a saved answer Raw HTML for HTML · Four-point maturity with a saved answer
<forma-ordinal-scale class="forma-component-tag">
  <fieldset class="forma-ordinal-scale forma-ordinal-scale--4">
    <legend class="forma-ordinal-scale__legend">How mature is incident post-review in your team?</legend>
    <div class="forma-ordinal-scale__options">
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-maturity-review" value="initial" required><span class="forma-ordinal-option__marker" aria-hidden="true">1</span><span class="forma-ordinal-option__label">Initial</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-maturity-review" value="developing"><span class="forma-ordinal-option__marker" aria-hidden="true">2</span><span class="forma-ordinal-option__label">Developing</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-maturity-review" value="established" checked><span class="forma-ordinal-option__marker" aria-hidden="true">3</span><span class="forma-ordinal-option__label">Established</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-maturity-review" value="optimized"><span class="forma-ordinal-option__marker" aria-hidden="true">4</span><span class="forma-ordinal-option__label">Optimized</span></label>
    </div>
  </fieldset>
</forma-ordinal-scale>

Click or tap the code once to select all of it, then copy.

Scenario

Frequency scale with one unavailable position

A three-point frequency scale where the application has disabled one position that does not apply to this respondent, with a description saying why. Heavy motion weight gives the marker press a slower, more settled response.

How often do you deploy on weekends?

Weekly is unavailable because weekend deploys are frozen for your team.

HTML · Frequency scale with one unavailable position Raw HTML for HTML · Frequency scale with one unavailable position
<forma-ordinal-scale class="forma-component-tag">
  <fieldset class="forma-ordinal-scale forma-ordinal-scale--3" data-forma-motion-weight="heavy" aria-describedby="ordinal-frequency-help">
    <legend class="forma-ordinal-scale__legend">How often do you deploy on weekends?</legend>
    <p class="forma-field__description" id="ordinal-frequency-help">Weekly is unavailable because weekend deploys are frozen for your team.</p>
    <div class="forma-ordinal-scale__options">
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-frequency-weekend" value="never" required><span class="forma-ordinal-option__marker" aria-hidden="true">1</span><span class="forma-ordinal-option__label">Never</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-frequency-weekend" value="monthly"><span class="forma-ordinal-option__marker" aria-hidden="true">2</span><span class="forma-ordinal-option__label">About once a month</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-frequency-weekend" value="weekly" disabled><span class="forma-ordinal-option__marker" aria-hidden="true">3</span><span class="forma-ordinal-option__label">Weekly</span></label>
    </div>
  </fieldset>
</forma-ordinal-scale>

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

Seven-point agreement on a phone

A seven-point scale with Not applicable at phone width. Options stack into a vertical list with the marker beside the label.

Viewport width

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

What changes at narrow widths

  • Below 44rem every cardinality collapses to one column; each option becomes a 52px-tall row with the marker at the start and the label beside it.
  • Dividers switch from vertical to horizontal between rows, preserving the order top to bottom.
  • Long labels wrap within the row instead of being squeezed into narrow columns.
  • The special-choices row wraps its pills onto new lines if needed; each keeps a 44px minimum height.
HTML · Seven-point agreement on a phone Raw HTML for HTML · Seven-point agreement on a phone
<forma-ordinal-scale class="forma-component-tag">
  <fieldset class="forma-ordinal-scale forma-ordinal-scale--7">
    <legend class="forma-ordinal-scale__legend">Our on-call rotation is sustainable.</legend>
    <div class="forma-ordinal-scale__options">
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="1" required><span class="forma-ordinal-option__marker" aria-hidden="true">1</span><span class="forma-ordinal-option__label">Strongly disagree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="2"><span class="forma-ordinal-option__marker" aria-hidden="true">2</span><span class="forma-ordinal-option__label">Disagree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="3"><span class="forma-ordinal-option__marker" aria-hidden="true">3</span><span class="forma-ordinal-option__label">Somewhat disagree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="4"><span class="forma-ordinal-option__marker" aria-hidden="true">4</span><span class="forma-ordinal-option__label">Neither agree nor disagree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="5"><span class="forma-ordinal-option__marker" aria-hidden="true">5</span><span class="forma-ordinal-option__label">Somewhat agree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="6"><span class="forma-ordinal-option__marker" aria-hidden="true">6</span><span class="forma-ordinal-option__label">Agree</span></label>
      <label class="forma-ordinal-option"><input type="radio" name="ordinal-mobile-oncall" value="7"><span class="forma-ordinal-option__marker" aria-hidden="true">7</span><span class="forma-ordinal-option__label">Strongly agree</span></label>
    </div>
    <div class="forma-special-choices" aria-label="Other responses">
      <label class="forma-special-choice"><input type="radio" name="ordinal-mobile-oncall" value="na"><span>Not applicable: I am not on call</span></label>
    </div>
  </fieldset>
</forma-ordinal-scale>

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—Required. One radio per scale position.
nameinputstring shared by all positions—Groups the positions (and any special choices) into one exclusive answer. Unique per question.
valueinputstring—Submitted value. The application maps values to meaning and scoring; visual order carries none.
requiredfirst inputbooleanabsentNative required-group validation.
checkedinputbooleanabsentRestores a saved answer.
disabledinput or fieldsetbooleanabsentRemoves a position (or the whole scale) from focus and submission and dims it.
aria-hidden.forma-ordinal-option__markertrue—The numbered marker is decorative; the label supplies the accessible name.
aria-label.forma-special-choicesstring—Names the group of non-scale answers, for example Other responses.
aria-describedbyfieldsetid list—Associates help or error text with the scale.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-ordinal-scaleBlock class—Root fieldset. Browser border and padding removed; it is also a motion scope.
.forma-ordinal-scale__legendElement class—Question or statement text above the options.
.forma-ordinal-scale__optionsElement class—Bordered grid holding the positions. Column count comes from the cardinality modifier.
.forma-ordinal-scale--10Modifier class—Ten equal columns.
.forma-ordinal-scale--11Modifier class—Eleven equal columns, for 0 to 10 scales.
.forma-ordinal-scale--3Modifier class—Three equal columns.
.forma-ordinal-scale--4Modifier class—Four equal columns (no midpoint).
.forma-ordinal-scale--5Modifier class—Five equal columns. Also the default when no modifier is set.
.forma-ordinal-scale--6Modifier class—Six equal columns.
.forma-ordinal-scale--7Modifier class—Seven equal columns.
[data-forma-motion-weight]Attribute hook"heavy", "light", "standard"Presentation-only perceived mass for the marker press response: light (default for this scope), standard or heavy. Never encodes importance or score.
.forma-ordinal-optionBlock class—Label for one position: marker above label, at least 5.5rem tall on wide screens. The radio is visually hidden but stays the hit and focus target.
.forma-ordinal-option__labelElement class—Text label for the position. Wraps anywhere to fit narrow columns.
.forma-ordinal-option__markerElement class—Circular numbered marker. It compresses slightly while pressed; the option does not move.
Keyboard interaction
KeysResult
Tab / Shift+TabMoves focus into the group (checked radio, or the first when unanswered) and out of it.
Arrow keysNative radio behavior: moves to and selects the previous or next position, including special choices that share the name.
SpaceSelects the focused position when none is checked.
Events
EventDescription
input / changeNative events from the radio that becomes checked.

Form behavior

Submits name=value for the checked position or special choice. Unanswered submits nothing and fails required validation; reset restores the initial checked state.

States

Ordinal scale states
StateHow it is expressedPresentation
Unansweredno checked radioAll positions show the neutral surface.
Hover:hover on the optionThe option surface shifts to the secondary surface.
Pressed:active on the radioThe marker scales to 0.92; the option hit target stays put.
Selected:checkedThe option takes the inverse surface and the marker fills with the accent color.
Focus:focus-visible on the radioTwo-tone focus ring around the option.
Disableddisabled attributeOption at reduced opacity with a not-allowed cursor; skipped by keyboard and not submitted.

Accessibility

Forma provides

  • Uses one native radio group in a fieldset with a legend, so the group name, position count and checked state come from the platform.
  • Keeps special answers visibly separated from the continuum so they are not mistaken for scale points.
  • Indicates selection with surface inversion plus a filled marker, and with Highlight/HighlightText in forced-colors mode.
  • Stacks options at narrow widths instead of shrinking touch targets.

Your application supplies

  • Give every position an accessible label; if only endpoints have visible words, add screen-reader text to the middle positions.
  • Map values to meaning and scoring in application logic; do not rely on order.
  • Keep the radio name unique per question and share it with special choices only when they are mutually exclusive with the scale.
  • Explain disabled positions in visible text.

Responsive behavior

  • Wide: equal minmax(0, 1fr) columns set by the cardinality modifier; labels wrap anywhere inside each column.
  • Below 44rem: one column for every cardinality; options become horizontal rows with a 3.25rem minimum height.
  • Special choices wrap as a flex row with a 0.5rem gap.
  • Ten and eleven point scales are tight on medium widths; prefer short or visually hidden labels for middle positions.

Motion

  • Option surface, border and text color use the shared perceptual interpolation (about 120ms), identical for every position so motion never encodes value.
  • The marker compresses to 0.92 scale on press using the press duration from the scale's motion scope; data-forma-motion-weight changes that duration. The option itself never moves.
  • Selection is immediate: rapid keyboard changes do not queue animations.
  • Under prefers-reduced-motion: reduce the marker transition is effectively instant and press compression is removed; selection styling is unchanged.

Motion weights

Forma motion is physics-derived: perceived mass changes how a surface accelerates and settles, never what state it is in. Compare the three presentation weights of the same markup:

lightpresentation only
Our deployment process is predictable.
standardpresentation only
Our deployment process is predictable.
heavypresentation only
Our deployment process is predictable.

Usage guidance

Do

  • Use parallel, balanced labels and the modifier that matches the number of positions.
  • Offer Don't know and Not applicable as Special choice answers when they are meaningful.

Avoid

  • Creating separate components for Likert, NPS or agreement presets.
  • Coloring positions red to green or otherwise implying which end is good.

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.