Vixen
feb85697

Core · guide

Form

Form is a set of fields submitted as one. Enter in a field or a click on the default button submits it, and a submission with a wrong field is refused with the keyboard put in the first one — HTML's rules, so an OK button no longer has to know every field it sits under.

Edit this page on GitHub

Documents

Next

  • Labeled content — LabeledContent is the form row — a caption, the field it names, and the line under it. It writes the LabelledBy and DescribedBy relations for you, which is the part a stylesheet cannot do and the part every hand-built form was missing.
  • Group box — GroupBox is the titled box round a set of related controls — HTML's fieldset and legend. Card draws the same picture; what only this one does is tell a screen reader that the controls inside answer one question.
  • Section — Section is a titled part of a page — a region landmark named by a heading of its own, so a screen-reader user can reach it both by landmark and by heading. It draws its title and nothing else.
  • Date picker and calendar — DatePicker is a select-shaped field whose list is a Calendar — a six-week month grid laid out by the culture and walked by the keyboard in ARIA's date-picker pattern. The calendar also stands on its own.
  • Text input and the input method — How typed text reaches a control, why an input method's pre-edit is a different event from typed text and what a field does with it, why the pre-edit is shown but is not the value, where the caret goes while a composition is running, what a platform head has to do for any of it to arrive, and why a caret index alone cannot say where the caret is at a wrap or a change of direction.
  • The accessibility tree — A role, a name, a value, a state and a set of relations on every element, computed from what a control already holds rather than mirrored into it — plus one coalesced per-frame event, so a screen-reader bridge can cache a tree and diff it instead of asking a node at a time.