Skip to the page
Tactile UI

Kit parts

Survey card

One question on a small plate: tick boxes under it, a Submit key and an X to close. Ticking “other” bares a one-line field. Submit stays dark until something is ticked. After Submit the card says thank you in its own place and shuts itself. It is the kit’s own Panel, Check, Field and Key, unchanged.

On this page
  1. Anatomy
  2. Variants
  3. States
  4. Props and options
  5. Usage notes
  6. Accessibility
  7. Related parts

Anatomy

No new part is drawn here. The plate is Panel, the boxes are Check inside Choice labels, the field is Field with Input, Submit is a primary Key and the X is a flat icon Key; the stylesheet only lays them out in one grid. A single set of listeners on the document, installed once, reads the card each time. Nothing is read from storage or sent anywhere; where the answer goes is the page’s listener.

Variants

  • Asking · nothing ticked
  • Other ticked · the field open
  • Your own question and answers

States

  • Nothing ticked
  • Ready
  • Other, with words
  • Thanks

Props and options

NameKindDescription
[data-surveycard-other]attributeThe key of the answer that bares the one-line field. Leave it out of the options and the field never shows.
[data-surveycard-thanks]attributeThe line said in the card after Submit.
closeSurveyCard(root)functionShut the card as the X does.

Usage notes

Tick “other”: a field opens under the list. Submit stays dark until a box is ticked. Press it and the card thanks you and shuts; the X shuts it at once.

Accessibility

  • The boxes sit in a fieldset whose legend is the question, so a screen reader hears the question once with the group, then each answer as a checkbox with its label.
  • Submit is really disabled until something is ticked (and the field has words, if “other” is the only tick); it does not just look dark.
  • The thanks is said through a status region that is in the page from the start, so it is announced when the words arrive.
  • The X is a button named “Close”; Escape pressed inside the card does the same. The card never takes focus by itself: opening it is the page’s to announce.
  • The card adds no motion of its own, so reduced motion changes nothing in it.

Panel

A face plate that groups what belongs together: a head, a rule, then the parts. Screws only on device-like panels.

Check

An option in a form: a small square key that presses below the plate when chosen, with a tick printed on it.

Key

Every button, and every link that acts like one: a cap on a skirt that drops below the plate when pressed.

Consent flap

A plate pinned to the page foot, hinged along its top edge. Closed, it reads as one line with Essential only, Choose and Accept all. Press Choose and the face tilts up while the compartment under it opens, baring three rocker switches, Necessary locked on. Press Save choices and the panel shuts and the face swings back down, latching flat with a small click.

Field

Text entry in a recess, the label printed above it, and a hint that says how to fix an error.