Choices Element (choices)
choices element creates a simple list structure for presenting multiple options in task topics. It's particularly suitable for documenting cases where, to complete a step, a reader must choose one option from several alternatives that each require a single action.
The choices element serves these primary purposes:
-
Organizing sets of mutually exclusive options in a simple list format
-
Providing a compact presentation of alternative actions within a single step of a task
-
Guiding users through decision points with clearly defined options
Key characteristics of the choices element:
-
An optional element that must be added within a
stepelement -
Must follow a
cmdelement that introduces the choices -
Must contain two or more
choiceelements -
Is intended for simple options where each choice triggers a single action
-
Is simpler and more compact than a
choicetable, which is used for more complex options
A choices element consists of these components:
- Choice (
choice) -
The required element that represents a single option the user can select. Each
choicetypically contains a brief description of the option and the action to perform if that option is selected. Multiplechoiceelements form a list of alternatives.The content of each
choiceelement may include:-
A brief description of the option
-
The action to perform if that option is selected
-
Optionally, the expected result
-
Content within the choices element typically follows these output formatting rules:
-
The choices list appears after the command that introduces it
-
Choices appear as a vertical list of options, typically with bullets
-
Each choice is presented as a single item in the list
-
Choices may be indented under the parent step or aligned with other step components
Choices best practices:
-
Use for presenting a set of mutually exclusive options within a single step
-
Use when each option triggers only one action, otherwise use
choicetable -
Use to present options in a compact, easy-to-scan format
A choices element added to a task topic in the Heretto CCMS Content Editor.
The DITA source of the choices element with the surrounding context of a task:
<task id="task-5044">
<title>Selecting a Display Mode</title>
<shortdesc>Choose a display mode for the MobileView dashboard that best suits your working environment.</shortdesc>
<prolog>
<author translate="no" type="creator">Heretto User <user@heretto.com></author>
</prolog>
<taskbody>
<context>
<p>MobileView offers several view modes to optimize visibility and usability in different lighting conditions and environments. You can change the view mode at any time from the <uicontrol>View</uicontrol> menu.</p>
</context>
<steps>
<step>
<cmd>Click <menucascade><uicontrol>View</uicontrol><uicontrol>Display Mode</uicontrol></menucascade>.</cmd>
</step>
<step>
<cmd>Select one of these display modes:</cmd>
<choices>
<choice>Select <uicontrol>Light Mode</uicontrol> for standard display with a white background and dark text, ideal for normal office lighting.</choice>
<choice>Select <uicontrol>Dark Mode</uicontrol> for reduced eye strain in low-light environments with a dark background and light text.</choice>
<choice>Select <uicontrol>High Contrast</uicontrol> for maximum readability with enhanced contrast between elements, ideal for outdoor use or accessibility needs.</choice>
<choice>Select <uicontrol>Auto</uicontrol> to let MobileView to switch automatically between light and dark modes based on your system settings.</choice>
</choices>
</step>
<step>
<cmd>Click <uicontrol>Apply</uicontrol> to save your display preferences.</cmd>
</step>
</steps>
</taskbody>
</task>