A command is the abstraction behind menu items, buttons, and links.
Commands are defined to have the following facets:
These facets are exposed on elements using the command API:
Exposes the Type facet of the command.
Exposes the ID facet of the command.
Exposes the Label facet of the command.
Exposes the Hint facet of the command.
Exposes the Icon facet of the command.
Exposes the Access Key facet of the command.
Exposes the state of the element's
hidden attribute, which is generally
equivalent to the Hidden
State facet of the command. For
legend elements (used in conjunction with the
accesskey attribute), the Hidden State facet is
derived from another element (the one that the assigned
access key will trigger), and cannot be directly accessed
from the element.
Exposes the Disabled State facet of the command.
Exposes the Checked State facet of the command.
Triggers the Action of the command.
HTMLCollection of the elements in the
Document that define commands and have IDs.
User agents may expose the commands whose Hidden State facet is false (visible), e.g. in the user agent's menu bar. User agents are encouraged to do this especially for commands that have Access Keys, as a way to advertise those keys to the user.