Bug 1718787 [wpt PR 29544] - Add web platform tests for cookie size requirements...
[gecko.git] / accessible / base / Role.h
blobd466d094edbb77c5bc1a15e9f327bd17456eb0cf
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef _role_h_
8 #define _role_h_
10 /**
11 * @note Make sure to update the localized role names when changing the list.
12 * @note When adding a new role, be sure to also add it to base/RoleMap.h and
13 * update nsIAccessibleRole.
16 namespace mozilla {
17 namespace a11y {
18 namespace roles {
20 enum Role {
21 /**
22 * Used when accessible hans't strong defined role.
24 NOTHING = 0,
26 /**
27 * Represents a title or caption bar for a window. It is used by MSAA only,
28 * supported automatically by MS Windows.
30 TITLEBAR = 1,
32 /**
33 * Represents the menu bar (positioned beneath the title bar of a window)
34 * from which menus are selected by the user. The role is used by
35 * xul:menubar or role="menubar".
37 MENUBAR = 2,
39 /**
40 * Represents a vertical or horizontal scroll bar, which is part of the client
41 * area or used in a control.
43 SCROLLBAR = 3,
45 /**
46 * Represents a special mouse pointer, which allows a user to manipulate user
47 * interface elements such as windows. For example, a user clicks and drags
48 * a sizing grip in the lower-right corner of a window to resize it.
50 GRIP = 4,
52 /**
53 * Represents a system sound, which is associated with various system events.
55 SOUND = 5,
57 /**
58 * Represents the system mouse pointer.
60 CURSOR = 6,
62 /**
63 * Represents the system caret. The role is supported for caret.
65 CARET = 7,
67 /**
68 * Represents an alert or a condition that a user should be notified about.
69 * Assistive Technologies typically respond to the role by reading the entire
70 * onscreen contents of containers advertising this role. Should be used for
71 * warning dialogs, etc. The role is used by xul:browsermessage,
72 * role="alert".
74 ALERT = 8,
76 /**
77 * Represents the window frame, which contains child objects such as
78 * a title bar, client, and other objects contained in a window. The role
79 * is supported automatically by MS Windows.
81 WINDOW = 9,
83 /**
84 * A sub-document (<frame> or <iframe>)
86 INTERNAL_FRAME = 10,
88 /**
89 * Represents a menu, which presents a list of options from which the user can
90 * make a selection to perform an action. It is used for role="menu".
92 MENUPOPUP = 11,
94 /**
95 * Represents a menu item, which is an entry in a menu that a user can choose
96 * to carry out a command, select an option. It is used for xul:menuitem,
97 * role="menuitem".
99 MENUITEM = 12,
102 * Represents a ToolTip that provides helpful hints.
104 TOOLTIP = 13,
107 * Represents a main window for an application. It is used for
108 * role="application". Also refer to APP_ROOT
110 APPLICATION = 14,
113 * Represents a document window. A document window is always contained within
114 * an application window. For role="document", see NON_NATIVE_DOCUMENT.
116 DOCUMENT = 15,
119 * Represents a pane within a frame or document window. Users can navigate
120 * between panes and within the contents of the current pane, but cannot
121 * navigate between items in different panes. Thus, panes represent a level
122 * of grouping lower than frame windows or documents, but above individual
123 * controls. It is used for the first child of a <frame> or <iframe>.
125 PANE = 16,
128 * Represents a graphical image used to represent data.
130 CHART = 17,
133 * Represents a dialog box or message box. It is used for xul:dialog,
134 * role="dialog".
136 DIALOG = 18,
139 * Represents a window border.
141 BORDER = 19,
144 * Logically groups other objects. There is not always a parent-child
145 * relationship between the grouping object and the objects it contains. It
146 * is used for html:textfield, xul:groupbox, role="group".
148 GROUPING = 20,
151 * Used to visually divide a space into two regions, such as a separator menu
152 * item or a bar that divides split panes within a window. It is used for
153 * xul:separator, html:hr, role="separator".
155 SEPARATOR = 21,
158 * Represents a toolbar, which is a grouping of controls (push buttons or
159 * toggle buttons) that provides easy access to frequently used features. It
160 * is used for xul:toolbar, role="toolbar".
162 TOOLBAR = 22,
165 * Represents a status bar, which is an area at the bottom of a window that
166 * displays information about the current operation, state of the application,
167 * or selected object. The status bar has multiple fields, which display
168 * different kinds of information. It is used for xul:statusbar.
170 STATUSBAR = 23,
173 * Represents a table that contains rows and columns of cells, and optionally,
174 * row headers and column headers. It is used for html:table,
175 * role="grid". Also refer to the following role: COLUMNHEADER,
176 * ROWHEADER, COLUMN, ROW, CELL.
178 TABLE = 24,
181 * Represents a column header, providing a visual label for a column in
182 * a table. It is used for XUL tree column headers, html:th,
183 * role="colheader". Also refer to TABLE.
185 COLUMNHEADER = 25,
188 * Represents a row header, which provides a visual label for a table row.
189 * It is used for role="rowheader". Also, see TABLE.
191 ROWHEADER = 26,
194 * Represents a column of cells within a table. Also, see TABLE.
196 COLUMN = 27,
199 * Represents a row of cells within a table. Also, see TABLE.
201 ROW = 28,
204 * Represents a cell within a table. It is used for html:td and xul:tree cell.
205 * Also, see TABLE.
207 CELL = 29,
210 * Represents a link to something else. This object might look like text or
211 * a graphic, but it acts like a button. It is used for
212 * xul:label@class="text-link", html:a, html:area.
214 LINK = 30,
217 * Displays a Help topic in the form of a ToolTip or Help balloon.
219 HELPBALLOON = 31,
222 * Represents a cartoon-like graphic object, such as Microsoft Office
223 * Assistant, which is displayed to provide help to users of an application.
225 CHARACTER = 32,
228 * Represents a list box, allowing the user to select one or more items. It
229 * is used for xul:listbox, html:select@size, role="list". See also
230 * LIST_ITEM.
232 LIST = 33,
235 * Represents an item in a list. See also LIST.
237 LISTITEM = 34,
240 * Represents an outline or tree structure, such as a tree view control,
241 * that displays a hierarchical list and allows the user to expand and
242 * collapse branches. Is is used for role="tree".
244 OUTLINE = 35,
247 * Represents an item in an outline or tree structure. It is used for
248 * role="treeitem".
250 OUTLINEITEM = 36,
253 * Represents a page tab, it is a child of a page tab list. It is used for
254 * xul:tab, role="treeitem". Also refer to PAGETABLIST.
256 PAGETAB = 37,
259 * Represents a property sheet. It is used for xul:tabpanel,
260 * role="tabpanel".
262 PROPERTYPAGE = 38,
265 * Represents an indicator, such as a pointer graphic, that points to the
266 * current item.
268 INDICATOR = 39,
271 * Represents a picture. Is is used for xul:image, html:img.
273 GRAPHIC = 40,
276 * Represents read-only text, such as labels for other controls or
277 * instructions in a dialog box. Static text cannot be modified or selected.
278 * Is is used for xul:label, xul:description, html:label, role="label".
280 STATICTEXT = 41,
283 * Represents selectable text that allows edits or is designated read-only.
285 TEXT_LEAF = 42,
288 * Represents a push button control. It is used for xul:button, html:button,
289 * role="button".
291 PUSHBUTTON = 43,
294 * Represents a check box control. It is used for xul:checkbox,
295 * html:input@type="checkbox", role="checkbox".
297 CHECKBUTTON = 44,
300 * Represents an option button, also called a radio button. It is one of a
301 * group of mutually exclusive options. All objects sharing a single parent
302 * that have this attribute are assumed to be part of single mutually
303 * exclusive group. It is used for xul:radio, html:input@type="radio",
304 * role="radio".
306 RADIOBUTTON = 45,
309 * Represents a combo box; a popup button with an associated list box that
310 * provides a set of predefined choices. It is used for html:select with a
311 * size of 1 and xul:menulist. See also ROLE_EDITCOMBOBOX.
313 COMBOBOX = 46,
316 * Represents the calendar control.
318 DROPLIST = 47,
321 * Represents a progress bar, dynamically showing the user the percent
322 * complete of an operation in progress. It is used for html:progress,
323 * role="progressbar".
325 PROGRESSBAR = 48,
328 * Represents a dial or knob whose purpose is to allow a user to set a value.
330 DIAL = 49,
333 * Represents a hot-key field that allows the user to enter a combination or
334 * sequence of keystrokes.
336 HOTKEYFIELD = 50,
339 * Represents a slider, which allows the user to adjust a setting in given
340 * increments between minimum and maximum values. It is used by xul:scale,
341 * role="slider".
343 SLIDER = 51,
346 * Represents a spin box, which is a control that allows the user to increment
347 * or decrement the value displayed in a separate "buddy" control associated
348 * with the spin box. It is used for input[type=number] spin buttons.
350 SPINBUTTON = 52,
353 * Represents a graphical image used to diagram data. It is used for svg:svg.
355 DIAGRAM = 53,
358 * Represents an animation control, which contains content that changes over
359 * time, such as a control that displays a series of bitmap frames.
361 ANIMATION = 54,
364 * Represents a mathematical equation. It is used by MATHML, where there is a
365 * rich DOM subtree for an equation. Use FLAT_EQUATION for <img role="math"
366 * alt="[TeX]"/>
368 EQUATION = 55,
371 * Represents a button that drops down a list of items.
373 BUTTONDROPDOWN = 56,
376 * Represents a button that drops down a menu.
378 BUTTONMENU = 57,
381 * Represents a button that drops down a grid. It is used for xul:colorpicker.
383 BUTTONDROPDOWNGRID = 58,
386 * Represents blank space between other objects.
388 WHITESPACE = 59,
391 * Represents a container of page tab controls. Is it used for xul:tabs,
392 * DHTML: role="tabs". Also refer to PAGETAB.
394 PAGETABLIST = 60,
397 * Represents a control that displays time.
399 CLOCK = 61,
402 * Represents a button on a toolbar that has a drop-down list icon directly
403 * adjacent to the button.
405 SPLITBUTTON = 62,
408 * Represents an edit control designed for an Internet Protocol (IP) address.
409 * The edit control is divided into sections for the different parts of the
410 * IP address.
412 IPADDRESS = 63,
415 * Represents a label control that has an accelerator.
417 ACCEL_LABEL = 64,
420 * Represents an arrow in one of the four cardinal directions.
422 ARROW = 65,
425 * Represents a control that can be drawn into and is used to trap events.
426 * It is used for html:canvas.
428 CANVAS = 66,
431 * Represents a menu item with a check box.
433 CHECK_MENU_ITEM = 67,
436 * Represents a specialized dialog that lets the user choose a color.
438 COLOR_CHOOSER = 68,
441 * Represents control whose purpose is to allow a user to edit a date.
443 DATE_EDITOR = 69,
446 * An iconified internal frame in an DESKTOP_PANE. Also refer to
447 * INTERNAL_FRAME.
449 DESKTOP_ICON = 70,
452 * A desktop pane. A pane that supports internal frames and iconified
453 * versions of those internal frames.
455 DESKTOP_FRAME = 71,
458 * A directory pane. A pane that allows the user to navigate through
459 * and select the contents of a directory. May be used by a file chooser.
460 * Also refer to FILE_CHOOSER.
462 DIRECTORY_PANE = 72,
465 * A file chooser. A specialized dialog that displays the files in the
466 * directory and lets the user select a file, browse a different directory,
467 * or specify a filename. May use the directory pane to show the contents of
468 * a directory. Also refer to DIRECTORY_PANE.
470 FILE_CHOOSER = 73,
473 * A font chooser. A font chooser is a component that lets the user pick
474 * various attributes for fonts.
476 FONT_CHOOSER = 74,
479 * Frame role. A top level window with a title bar, border, menu bar, etc.
480 * It is often used as the primary window for an application.
482 CHROME_WINDOW = 75,
485 * A glass pane. A pane that is guaranteed to be painted on top of all
486 * panes beneath it. Also refer to ROOT_PANE.
488 GLASS_PANE = 76,
491 * A document container for HTML, whose children represent the document
492 * content.
494 HTML_CONTAINER = 77,
497 * A small fixed size picture, typically used to decorate components.
499 ICON = 78,
502 * Presents an icon or short string in an interface.
504 LABEL = 79,
507 * A layered pane. A specialized pane that allows its children to be drawn
508 * in layers, providing a form of stacking order. This is usually the pane
509 * that holds the menu bar as well as the pane that contains most of the
510 * visual components in a window. Also refer to GLASS_PANE and
511 * ROOT_PANE.
513 LAYERED_PANE = 80,
516 * A specialized pane whose primary use is inside a dialog.
518 OPTION_PANE = 81,
521 * A text object uses for passwords, or other places where the text content
522 * is not shown visibly to the user.
524 PASSWORD_TEXT = 82,
527 * A temporary window that is usually used to offer the user a list of
528 * choices, and then hides when the user selects one of those choices.
530 POPUP_MENU = 83,
533 * A radio button that is a menu item.
535 RADIO_MENU_ITEM = 84,
538 * A root pane. A specialized pane that has a glass pane and a layered pane
539 * as its children. Also refer to GLASS_PANE and LAYERED_PANE.
541 ROOT_PANE = 85,
544 * A scroll pane. An object that allows a user to incrementally view a large
545 * amount of information. Its children can include scroll bars and a
546 * viewport. Also refer to VIEW_PORT.
548 SCROLL_PANE = 86,
551 * A split pane. A specialized panel that presents two other panels at the
552 * same time. Between the two panels is a divider the user can manipulate to
553 * make one panel larger and the other panel smaller.
555 SPLIT_PANE = 87,
558 * The header for a column of a table.
559 * XXX: it looks this role is dupe of COLUMNHEADER.
561 TABLE_COLUMN_HEADER = 88,
564 * The header for a row of a table.
565 * XXX: it looks this role is dupe of ROWHEADER
567 TABLE_ROW_HEADER = 89,
570 * A menu item used to tear off and reattach its menu.
572 TEAR_OFF_MENU_ITEM = 90,
575 * Represents an accessible terminal.
577 TERMINAL = 91,
580 * Collection of objects that constitute a logical text entity.
582 TEXT_CONTAINER = 92,
585 * A toggle button. A specialized push button that can be checked or
586 * unchecked, but does not provide a separate indicator for the current state.
588 TOGGLE_BUTTON = 93,
591 * Represent a control that is capable of expanding and collapsing rows as
592 * well as showing multiple columns of data.
594 TREE_TABLE = 94,
597 * A viewport. An object usually used in a scroll pane. It represents the
598 * portion of the entire data that the user can see. As the user manipulates
599 * the scroll bars, the contents of the viewport can change. Also refer to
600 * SCROLL_PANE.
602 VIEWPORT = 95,
605 * Header of a document page. Also refer to FOOTER.
607 HEADER = 96,
610 * Footer of a document page. Also refer to HEADER.
612 FOOTER = 97,
615 * A paragraph of text.
617 PARAGRAPH = 98,
620 * A ruler such as those used in word processors.
622 RULER = 99,
625 * A text entry having dialog or list containing items for insertion into
626 * an entry widget, for instance a list of words for completion of a
627 * text entry. It is used for xul:textbox@autocomplete
629 AUTOCOMPLETE = 100,
632 * An editable text object in a toolbar.
634 EDITBAR = 101,
637 * An control whose textual content may be entered or modified by the user.
639 ENTRY = 102,
642 * A caption describing another object.
644 CAPTION = 103,
647 * An element containing content that assistive technology users may want to
648 * browse in a reading mode, rather than a focus/interactive/application mode.
649 * This role is used for role="document". For the container which holds the
650 * content of a web page, see DOCUMENT.
652 NON_NATIVE_DOCUMENT = 104,
655 * Heading.
657 HEADING = 105,
660 * An object representing a page of document content. It is used in documents
661 * which are accessed by the user on a page by page basis.
663 PAGE = 106,
666 * A container of document content. An example of the use of this role is to
667 * represent an html:div.
669 SECTION = 107,
672 * An object which is redundant with another object in the accessible
673 * hierarchy. ATs typically ignore objects with this role.
675 REDUNDANT_OBJECT = 108,
678 * A container of form controls. An example of the use of this role is to
679 * represent an html:form.
681 FORM = 109,
684 * An object which is used to allow input of characters not found on a
685 * keyboard, such as the input of Chinese characters on a Western keyboard.
687 IME = 110,
690 * XXX: document this.
692 APP_ROOT = 111,
695 * Represents a menu item, which is an entry in a menu that a user can choose
696 * to display another menu.
698 PARENT_MENUITEM = 112,
701 * A calendar that allows the user to select a date.
703 CALENDAR = 113,
706 * A list of items that is shown by combobox.
708 COMBOBOX_LIST = 114,
711 * A item of list that is shown by combobox.
713 COMBOBOX_OPTION = 115,
716 * An image map -- has child links representing the areas
718 IMAGE_MAP = 116,
721 * An option in a listbox
723 OPTION = 117,
726 * A rich option in a listbox, it can have other widgets as children
728 RICH_OPTION = 118,
731 * A list of options
733 LISTBOX = 119,
736 * Represents a mathematical equation in the accessible name
738 FLAT_EQUATION = 120,
741 * Represents a cell within a grid. It is used for role="gridcell". Unlike
742 * CELL, it allows the calculation of the accessible name from subtree.
743 * Also, see TABLE.
745 GRID_CELL = 121,
748 * Represents an embedded object. It is used for html:object or html:embed.
750 EMBEDDED_OBJECT = 122,
753 * A note. Originally intended to be hidden until activated, but now also used
754 * for things like html 'aside'.
756 NOTE = 123,
759 * A figure. Used for things like HTML5 figure element.
761 FIGURE = 124,
764 * Represents a rich item with a check box.
766 CHECK_RICH_OPTION = 125,
769 * Represent a definition list (dl in HTML).
771 DEFINITION_LIST = 126,
774 * Represent a term in a definition list (dt in HTML).
776 TERM = 127,
779 * Represent a definition in a definition list (dd in HTML)
781 DEFINITION = 128,
784 * Represent a keyboard or keypad key (ARIA role "key").
786 KEY = 129,
789 * Represent a switch control widget (ARIA role "switch").
791 SWITCH = 130,
794 * A block of MathML code (math).
796 MATHML_MATH = 131,
799 * A MathML identifier (mi in MathML).
801 MATHML_IDENTIFIER = 132,
804 * A MathML number (mn in MathML).
806 MATHML_NUMBER = 133,
809 * A MathML operator (mo in MathML).
811 MATHML_OPERATOR = 134,
814 * A MathML text (mtext in MathML).
816 MATHML_TEXT = 135,
819 * A MathML string literal (ms in MathML).
821 MATHML_STRING_LITERAL = 136,
824 * A MathML glyph (mglyph in MathML).
826 MATHML_GLYPH = 137,
829 * A MathML row (mrow in MathML).
831 MATHML_ROW = 138,
834 * A MathML fraction (mfrac in MathML).
836 MATHML_FRACTION = 139,
839 * A MathML square root (msqrt in MathML).
841 MATHML_SQUARE_ROOT = 140,
844 * A MathML root (mroot in MathML).
846 MATHML_ROOT = 141,
849 * A MathML fenced element (mfenced in MathML).
851 MATHML_FENCED = 142,
854 * A MathML enclosed element (menclose in MathML).
856 MATHML_ENCLOSED = 143,
859 * A MathML styling element (mstyle in MathML).
861 MATHML_STYLE = 144,
864 * A MathML subscript (msub in MathML).
866 MATHML_SUB = 145,
869 * A MathML superscript (msup in MathML).
871 MATHML_SUP = 146,
874 * A MathML subscript and superscript (msubsup in MathML).
876 MATHML_SUB_SUP = 147,
879 * A MathML underscript (munder in MathML).
881 MATHML_UNDER = 148,
884 * A MathML overscript (mover in MathML).
886 MATHML_OVER = 149,
889 * A MathML underscript and overscript (munderover in MathML).
891 MATHML_UNDER_OVER = 150,
894 * A MathML multiple subscript and superscript element (mmultiscripts in
895 * MathML).
897 MATHML_MULTISCRIPTS = 151,
900 * A MathML table (mtable in MathML).
902 MATHML_TABLE = 152,
905 * A MathML labelled table row (mlabeledtr in MathML).
907 MATHML_LABELED_ROW = 153,
910 * A MathML table row (mtr in MathML).
912 MATHML_TABLE_ROW = 154,
915 * A MathML table entry or cell (mtd in MathML).
917 MATHML_CELL = 155,
920 * A MathML interactive element (maction in MathML).
922 MATHML_ACTION = 156,
925 * A MathML error message (merror in MathML).
927 MATHML_ERROR = 157,
930 * A MathML stacked (rows of numbers) element (mstack in MathML).
932 MATHML_STACK = 158,
935 * A MathML long division element (mlongdiv in MathML).
937 MATHML_LONG_DIVISION = 159,
940 * A MathML stack group (msgroup in MathML).
942 MATHML_STACK_GROUP = 160,
945 * A MathML stack row (msrow in MathML).
947 MATHML_STACK_ROW = 161,
950 * MathML carries, borrows, or crossouts for a row (mscarries in MathML).
952 MATHML_STACK_CARRIES = 162,
955 * A MathML carry, borrow, or crossout for a column (mscarry in MathML).
957 MATHML_STACK_CARRY = 163,
960 * A MathML line in a stack (msline in MathML).
962 MATHML_STACK_LINE = 164,
965 * A group containing radio buttons
967 RADIO_GROUP = 165,
970 * A text container exposing brief amount of information. See related
971 * TEXT_CONTAINER role.
973 TEXT = 166,
976 * The html:details element.
978 DETAILS = 167,
981 * The html:summary element.
983 SUMMARY = 168,
986 * An ARIA landmark. See related NAVIGATION role.
988 LANDMARK = 169,
991 * A specific type of ARIA landmark. The ability to distinguish navigation
992 * landmarks from other types of landmarks is, for example, needed on macOS
993 * where specific AXSubrole and AXRoleDescription for navigation landmarks
994 * are used.
996 NAVIGATION = 170,
999 * An object that contains the text of a footnote.
1001 FOOTNOTE = 171,
1004 * A complete or self-contained composition in a document, page, application,
1005 * or site and that is, in principle, independently distributable or reusable,
1006 * e.g. in syndication.
1008 ARTICLE = 172,
1011 * A perceivable section containing content that is relevant to a specific,
1012 * author-specified purpose and sufficiently important that users will likely
1013 * want to be able to navigate to the section easily and to have it listed in
1014 * a summary of the page.
1016 REGION = 173,
1019 * Represents a control with a text input and a popup with a set of predefined
1020 * choices. It is used for ARIA's combobox role. See also COMBOBOX.
1022 EDITCOMBOBOX = 174,
1025 * A section of content that is quoted from another source.
1027 BLOCKQUOTE = 175,
1030 * Content previously deleted or proposed for deletion, e.g. in revision
1031 * history or a content view providing suggestions from reviewers.
1033 CONTENT_DELETION = 176,
1036 * Content previously inserted or proposed for insertion, e.g. in revision
1037 * history or a content view providing suggestions from reviewers.
1039 CONTENT_INSERTION = 177,
1042 * An html:form element with a label provided by WAI-ARIA.
1043 * This may also be used if role="form" with a label should be exposed
1044 * differently in the future.
1046 FORM_LANDMARK = 178,
1049 * The html:mark element.
1050 * This is also used for the equivalent WAI-ARIA role.
1052 MARK = 179,
1055 * The WAI-ARIA suggestion role.
1057 SUGGESTION = 180,
1060 * The WAI-ARIA comment role.
1062 COMMENT = 181,
1065 * A snippet of program code. ATs might want to treat this differently.
1067 CODE = 182,
1070 * Represents control whose purpose is to allow a user to edit a time.
1072 TIME_EDITOR = 183,
1075 * Represents the marker associated with a list item. In unordered lists,
1076 * this is a bullet, while in ordered lists this is a number.
1078 LISTITEM_MARKER = 184,
1081 * Essentially, this is a progress bar with a contextually defined
1082 * scale, ex. the strength of a password entered in an input.
1084 METER = 185,
1086 LAST_ROLE = METER
1089 } // namespace roles
1091 typedef enum mozilla::a11y::roles::Role role;
1093 } // namespace a11y
1094 } // namespace mozilla
1096 #endif