VERIFICATION-0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
Section 1 of 4 · Governance · Extended localized content for verification and layout resilience
<forma-survey-progress>
Determinate progress using the native progress element plus explicit current/total text.
<forma-survey-progress>patterns/survey-progress.htmlSurvey progress tells respondents where they are in a questionnaire: a label, an explicit "Question 3 of 12" value, a native progress bar and optional section context. The text is the primary information; the bar reinforces it. All values come from the application, which defines what progress means (questions, pages or sections) and recalculates it when branching changes the total. Forma never decides whether work is complete.
progress with value and max, labelled by the visible label.accent-color; the bar keeps the platform's rendering.The smallest correct markup: the canonical pattern from patterns/survey-progress.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Section 1 of 4 · Governance
<forma-survey-progress class="forma-component-tag">
<div class="forma-survey-progress">
<div class="forma-survey-progress__header">
<span class="forma-survey-progress__label" id="survey-progress-label">Survey progress</span>
<span class="forma-survey-progress__value">Question 3 of 12</span>
</div>
<progress class="forma-survey-progress__bar" value="3" max="12" aria-labelledby="survey-progress-label">25%</progress>
<p class="forma-survey-progress__context">Section 1 of 4 · Governance</p>
</div>
</forma-survey-progress>
Click or tap the code once to select all of it, then copy.
Progress measured in pages. An earlier answer removed a section, so the application recalculated the total from 6 to 5 pages and says so in the context line.
Security section skipped based on your earlier answer.
<forma-survey-progress class="forma-component-tag">
<div class="forma-survey-progress">
<div class="forma-survey-progress__header">
<span class="forma-survey-progress__label" id="survey-page-label">Assessment progress</span>
<span class="forma-survey-progress__value">Page 2 of 5</span>
</div>
<progress class="forma-survey-progress__bar" value="2" max="5" aria-labelledby="survey-page-label">40%</progress>
<p class="forma-survey-progress__context">Security section skipped based on your earlier answer.</p>
</div>
</forma-survey-progress>
Click or tap the code once to select all of it, then copy.
The final question is answered and the bar is full. The text tells the respondent what happens next; a full bar alone does not mean the application has accepted the submission.
Review your answers, then submit.
<forma-survey-progress class="forma-component-tag">
<div class="forma-survey-progress">
<div class="forma-survey-progress__header">
<span class="forma-survey-progress__label" id="survey-done-label">Survey progress</span>
<span class="forma-survey-progress__value">12 of 12 answered</span>
</div>
<progress class="forma-survey-progress__bar" value="12" max="12" aria-labelledby="survey-done-label">100%</progress>
<p class="forma-survey-progress__context">Review your answers, then submit.</p>
</div>
</forma-survey-progress>
Click or tap the code once to select all of it, then copy.
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.
A long label and value at phone width. The header wraps onto two lines while the bar stays full width.
<forma-survey-progress class="forma-component-tag">
<div class="forma-survey-progress">
<div class="forma-survey-progress__header">
<span class="forma-survey-progress__label" id="survey-mobile-label">Operational readiness assessment</span>
<span class="forma-survey-progress__value">Question 17 of 40</span>
</div>
<progress class="forma-survey-progress__bar" value="17" max="40" aria-labelledby="survey-mobile-label">43%</progress>
<p class="forma-survey-progress__context">Section 3 of 6 · Incident response and communication</p>
</div>
</forma-survey-progress>
Click or tap the code once to select all of it, then copy.
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
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 |
|---|---|---|---|---|
value | progress | number | — | Current position supplied by the application. |
max | progress | number | 1 | Total supplied by the application; update it when branching changes the total. |
aria-labelledby | progress | id of .forma-survey-progress__label | — | Gives the bar its accessible name. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-survey-progress | Block class | — | Root grid stacking header, bar and context. |
.forma-survey-progress__bar | Element class | — | The native progress element: full width, 0.65rem tall, accent color from the theme. |
.forma-survey-progress__context | Element class | — | Optional section or status text under the bar. |
.forma-survey-progress__header | Element class | — | Wrapping flex row with label and value at opposite ends. |
.forma-survey-progress__label | Element class | — | Bold visible label; reference it from the bar. |
.forma-survey-progress__value | Element class | — | Explicit current/total text in small monospace. |
| Keys | Result |
|---|---|
| None | Not interactive and not focusable. |
Does not participate in forms.
| State | How it is expressed | Presentation |
|---|---|---|
| In progress | value < max | Partially filled bar with explicit text. |
| Full | value = max | Bar filled. Completion is still decided by the application. |
| Recalculated | application changes max | The bar and text reflect the new total; explain the change in context text. |
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.