3. Logic & Validation7 min readINTERMEDIATE

Survey Progress Bar & Programmable Indicators

Configure linear, hierarchical, or sandboxed custom arithmetic progress indicators with minimal visual footprint and monotonic non-decrement protection.

#progress-bar#directives#math#wcag#monotonic#survey-studio#indicators

Executive Overview & Business Value#

In quantitative market research and complex B2B surveys, participant drop-off directly tracks respondent cognitive load and perceived completion ambiguity. Progress bars that unexpectedly decrement following skip-logic branches or multi-dimensional batteries induce frustration and abandonment.

The [PROGRESS_BAR] directive provides a declarative, deterministic, and isomorphic standard unified across all three surfaces of the Daesen platform:

  1. 1DOCX Ingestion Engine: Parses and extracts progress configuration directly from Word documents.
  2. 2Survey Studio: Provides visual controls, Survey Studio syntax highlighting, diagnostic squiggles, and interactive simulation.
  3. 3Testing Sandbox & Production Runner: Ensures identical, deterministic execution with an ultra-slim footprint and assistive technology support.

Canonical Directive Syntax#

The directive is declared globally in the survey header or within the survey body:

dsl
[PROGRESS_BAR: mode="expression-weighted", visibility="floating-bottom", minStep=0, maxStep=100, formula="($survey.answered / $survey.total) * 100"]

Configuration Parameters:#

ParameterTypeAllowed ValuesDefault ValueDescription
modestring"linear-steps", "page-tree", "expression-weighted""linear-steps"Progression algorithm used to calculate completion percentage.
visibilitystring"top", "floating-bottom", "none" (aliases: position, bottom, floating, off, disabled)"top"Viewport positioning of the indicator. When set to "none", it is completely omitted.
formulastringArithmetic expression (alias: expression)OptionalMathematical formula evaluated when in expression-weighted mode.
minStepnumberNumber between 0 and 100 (alias: min)0Guaranteed lower bound of the progress bar.
maxStepnumberNumber between 0 and 100 (alias: max)100Guaranteed upper bound of the progress bar.
showStepsbooleantrue, false (alias: steps)trueDisplays or hides the sequential step counter label (e.g. Step 3 of 10).
showPercentagebooleantrue, false (alias: percentage)falseDisplays or hides the numerical percentage badge (e.g. 45%).

To suppress the indicator directly, write [PROGRESS_BAR: none], off, false, or disabled.


Calculation Modes#

1. Linear Steps (mode="linear-steps")#

Calculates progress based on the linear index of the active question relative to total active questions:

Progress = (Current Index / Total Active Questions) × 100

Best suited for sequential surveys without complex branching graphs.

2. Page Tree Graph (mode="page-tree")#

Evaluates progress across hierarchical section depths and module weights. If sections are bypassed via [SKIP TO], the graph recalculates the critical path forward without penalizing the respondent.

3. Expression Weighted (mode="expression-weighted")#

Allows authors to define custom arithmetic formulas parsed and evaluated by a safe, sandboxed recursive-descent engine (zero-eval, completely immune to code injection).

Safe Context Variables:#

  • $survey.answered: Count of answered required questions.
  • $survey.total: Total count of active, visible questions in the respondent's current path.
  • $survey.answeredRequired / $survey.totalRequired: Required-question counters along the active path.
  • $survey.answeredCount / $survey.totalQuestions: Total questions answered out of all study questions (ideal for multi-question screens).
  • $survey.totalVisibleRequired: Total visible required questions based on condition visibility.
  • $survey.currentIndex: 0-based index of current question.
  • $survey.currentStep: 1-based step counter (e.g. Step 3).

Monotonic Progression Protection#

A frequent issue in legacy survey engines occurs when skip-logic jumps over multiple questions, causing the progress percentage to recalculate downwards. This creates respondent frustration and perceived survey lengthening.

Daesen enforces Strict Monotonic Progression:

Progress(t) = max(Progress(t-1), Progress(t))

The displayed progress value will never decrease during an active respondent session, even during dynamic graph re-evaluations.


Universal Accessibility (WCAG 2.1 AA)#

The NeuProgressBar atom satisfies international accessibility guidelines:

  • Semantic role role="progressbar".
  • Dynamic ARIA metadata: aria-valuenow, aria-valuemin="0", aria-valuemax="100", and aria-label="Survey completion progress".
  • High-contrast ratio exceeding 4.5:1 across light and dark modes.
  • Respects prefers-reduced-motion system preferences by disabling CSS width transition animations.

Behavior with Paged Blocks ([PAGE] & [FLOW: PAGED_BLOCKS])#

When you group multiple related questions onto one shared screen using [FLOW: PAGED_BLOCKS] with [PAGE] ... [END PAGE] (or [PAGE_BREAK]), progress feedback adapts automatically to keep respondents oriented:

  1. 1Page Block Header (Page X of Y): In grouped Paged Blocks layout, each screen renders a consolidated card displaying Page X of Y and active questions on that screen, uniting Back / Next navigation in one clean footer.
  2. 2Monotonic Multi-Question Evaluation: Across screens, the underlying progress engine still filters active, visible, non-bypassed questions and enforces monotonic forward progression so percentage never steps backwards when conditional branches skip blocks.
  3. 3Practical Recommendation for Researchers: Pair [FLOW: PAGED_BLOCKS] with mode="expression-weighted" and formula="($survey.answeredCount / $survey.totalQuestions) * 100" (or mode="page-tree") so multi-question screens translate cleanly into overall completion tracking. In 1-per-screen (wizard) mode, the ultra-slim bar renders directly above or floating below each card; in grouped (Paged Blocks) mode, the screen prioritizes the clean Page X of Y page counter.

formsDSL Code Examples#

Example A: Floating-Bottom Weighted Indicator with [PAGE] Blocks#

dsl
[PROGRESS_BAR: mode="expression-weighted", visibility="floating-bottom", minStep=0, maxStep=100, showSteps=true, showPercentage=true, formula="($survey.answeredCount / $survey.totalQuestions) * 100"]
[FLOW: PAGED_BLOCKS]

[SCREENER]

[PAGE]
S1. What is your primary organizational role?
[SINGLE CHOICE]
	1. Chief Technology Officer / CIO
	2. IT Director
	3. Software Engineer
	4. Non-IT Professional [CLOSE]

S2. Which cloud infrastructure providers do you actively utilize?
[MULTIPLE CHOICE]
	1. Amazon Web Services (AWS)
	2. Microsoft Azure
	3. Google Cloud Platform (GCP)
	99. None of the above [EXCLUSIVE, FIX]
[END PAGE]
Live Component Previewsingle choice
ID: S1
Questions Flow (2):
What is your primary organizational role?
Answer [S1]:No answer selected / empty

Example B: Page Tree Mode with [PAGE_BREAK]#

dsl
[PROGRESS_BAR: mode="page-tree", visibility="top", showSteps=true, showPercentage=false]
[FLOW: PAGED_BLOCKS]

Q1. How often does your team review vendor renewals?
[SINGLE CHOICE]
	1. Quarterly
	2. Annually
	3. Every 2+ years

[PAGE_BREAK]

Q2. What is your top operational priority for the next 12 months?
[OPEN ENDED]
Live Component Previewsingle choice
ID: Q1
Questions Flow (2):
How often does your team review vendor renewals?
Answer [Q1]:No answer selected / empty

Example C: Explicit Indicator Suppression#

dsl
[PROGRESS_BAR: none]

Was this article helpful?

Your feedback helps us continuously improve our technical guides.

Have a specific question not covered here?Contact Support

Trademark Notice: All product names, trademarks, and registered trademarks cited in this documentation (including Microsoft®, Word®, Apple®, Samsung®, etc.) are property of their respective owners and used strictly for identification, technical compatibility, and illustrative market research demonstration purposes under nominative fair use.