ApplicationControl.id
property · packages/mixins-richtext/src/formatting.ts:58
readonly id: stringUnique among the application's controls; the element's id and data-item are app-<id>.
Rich text / foldkit-mixins-richtext
interface · packages/mixins-richtext/src/formatting.ts:56
interface ApplicationControl<Message> {
readonly id: string
readonly label: string
readonly icon?: RichTextIconName | undefined
readonly shortcut?: string | undefined
readonly pressed?: boolean | undefined
readonly disabled?: boolean | undefined
readonly message: Message
readonly popup?:
| {
readonly kind: 'menu' | 'dialog'
readonly open: boolean
}
| undefined
}A control of the application's own in the bar: it joins the same tab stop and the same arrow
keys, in the place items gives it. message is what a press sends. A press of a disabled
control sends nothing (the control is aria-disabled and stays focusable), and the
application's update must refuse the Message in that state too, since a Message can arrive
from elsewhere.
ApplicationControl.idproperty · packages/mixins-richtext/src/formatting.ts:58
readonly id: stringUnique among the application's controls; the element's id and data-item are app-<id>.
ApplicationControl.labelproperty · packages/mixins-richtext/src/formatting.ts:60
readonly label: stringThe control's accessible name, and its visible text where it has no icon.
ApplicationControl.iconproperty · packages/mixins-richtext/src/formatting.ts:61
readonly icon?: RichTextIconName | undefinedApplicationControl.shortcutproperty · packages/mixins-richtext/src/formatting.ts:63
readonly shortcut?: string | undefinedA foldkit-primitives pattern ('mod+k'), shown in the title and as aria-keyshortcuts.
ApplicationControl.pressedproperty · packages/mixins-richtext/src/formatting.ts:65
readonly pressed?: boolean | undefinedaria-pressed, for a control that is on; absent for one that is not a toggle.
ApplicationControl.disabledproperty · packages/mixins-richtext/src/formatting.ts:66
readonly disabled?: boolean | undefinedApplicationControl.messageproperty · packages/mixins-richtext/src/formatting.ts:67
readonly message: MessageApplicationControl.popupproperty · packages/mixins-richtext/src/formatting.ts:74
readonly popup?:
| {
readonly kind: 'menu' | 'dialog'
readonly open: boolean
}
| undefinedA control that opens something the application draws, as link opens the link editor:
aria-haspopup says which kind and, for a menu, aria-expanded says whether it is open.
message then toggles it. ArrowDown on a closed menu's trigger and Escape on an open popup's
trigger send message, as for the built-in menus.