1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // These should be kept in sync with third_party/WebKit/public/web/WebAXEnums.h
6 // until the Chromium and Blink trees are merged.
7 [camel_case_enum_to_string
=true
] namespace ui
{
9 // For new entries to the following three enums, also add to
10 // chrome/common/extensions/api/automation.idl.
12 // Explanation of the comments next to these events:
14 // Web: this event is only used in web content. Unless a specific platform
15 // is specified, it fires a native event on multiple platforms.
17 // Native: this event is only used in native UI.
19 // Implicit: it would be cleaner if we just updated the AX node
20 // and each platform fired the appropriate events to indicate which
21 // platform-specific attributes changed.
23 // If unspecified, the event is used across web and native on multiple
26 activedescendantchanged
, // Web
28 aria_attribute_changed
, // Implicit
29 autocorrection_occured
, // Unknown: http://crbug.com/392498
30 blur
, // Remove: http://crbug.com/392502
31 checked_state_changed
, // Implicit
34 hide
, // Remove: http://crbug.com/392502
36 invalid_status_changed
, // Implicit
37 layout_complete
, // Web
38 live_region_changed
, // Web
40 location_changed
, // Web
41 menu_end
, // Native / Win
42 menu_list_item_selected
, // Web
43 menu_list_value_changed
, // Web
44 menu_popup_end
, // Native / Win
45 menu_popup_start
, // Native / Win
46 menu_start
, // Native / Win
47 row_collapsed
, // Web / Mac
48 row_count_changed
, // Web / Mac
49 row_expanded
, // Web / Mac
50 scroll_position_changed
, // Web
51 scrolled_to_anchor
, // Web
52 selected_children_changed
, // Web
54 selection_add
, // Native
55 selection_remove
, // Native
56 show
, // Remove: http://crbug.com/392502
58 text_selection_changed
,
59 tree_changed
, // Accessibility tree changed. Don't
60 // explicitly fire an accessibility event,
61 // only implicitly due to the change.
90 description_list_detail
,
92 description_list_term
,
109 iframe_presentational
,
175 table_header_container
,
193 // TODO(dmazzoni): switch content/ to use AX_STATE_DISABLED instead of
194 // !AX_STATE_ENABLED, and AX_STATE_EDITABLE instead of !AX_STATE_READONLY.
200 disabled
, // ui/views only
201 editable
, // ui/views only
202 enabled
, // content only
225 // A change to the accessibility tree.
233 [cpp_enum_prefix_override
="ax_attr"] enum AXStringAttribute
{
234 // Document attributes.
240 // Attributes that could apply to any node.
244 container_live_relevant
,
245 container_live_status
,
250 // Only used when invalid_state == invalid_state_other.
262 [cpp_enum_prefix_override
="ax_attr"] enum AXIntAttribute
{
263 // Scrollable container attributes.
271 // Editable text attributes.
280 // Table row attributes.
284 // Table column attributes.
286 table_column_header_id
,
288 // Table cell attributes.
289 table_cell_column_index
,
290 table_cell_column_span
,
291 table_cell_row_index
,
295 // Tree control attributes.
298 // Relationships between this element and other elements.
302 // Uniquely identifies an AXTree.
305 // Identifies a child tree which this node hosts.
308 // Position or Number of items in current set of listitems or treeitems
312 // In the case of AX_ROLE_COLOR_WELL, specifies the selected color.
318 // Foreground and background color in RGBA.
322 // Indicates if a form control has invalid input or
323 // if an element has an aria-invalid attribute.
326 // Specifies the direction of the text, e.g., right-to-left.
329 // Bold, italic, underline, etc.
333 [cpp_enum_prefix_override
="ax_attr"] enum AXFloatAttribute
{
334 // Document attributes.
335 doc_loading_progress
,
343 // Font size is in pixels.
347 [cpp_enum_prefix_override
="ax_attr"] enum AXBoolAttribute
{
348 // Document attributes.
351 // True if a checkbox or radio button is in the "mixed" state.
354 // Live region attributes.
355 container_live_atomic
,
360 // ARIA readonly flag.
363 // Writeable attributes
366 // If this is set, all of the other fields in this struct should
367 // be ignored and only the locations should change.
368 update_location_only
,
370 // Set on a canvas element if it has fallback content.
373 // Set if this node is the host of an external AXTree, for
374 // example a web view that's a child of a native view, or a
375 // web iframe that's the child of another web frame.
379 [cpp_enum_prefix_override
="ax_attr"] enum AXIntListAttribute
{
380 // Ids of nodes that are children of this node logically, but are
381 // not children of this node in the tree structure. As an example,
382 // a table cell is a child of a row, and an 'indirect' child of a
386 // Relationships between this element and other elements.
393 // Character indices where line breaks occur.
396 // For a table, the cell ids in row-major order, with duplicate entries
397 // when there's a rowspan or colspan, and with -1 for missing cells.
398 // There are always exactly rows * columns entries.
401 // For a table, the unique cell ids in row-major order of their first
405 // For inline text. This is the pixel position of the end of this
406 // character within the bounding rectangle of this object, in the
407 // direction given by AX_ATTR_TEXT_DIRECTION. For example, for left-to-right
408 // text, the first offset is the right coordinate of the first character
409 // within the object's bounds, the second offset is the right coordinate
410 // of the second character, and so on.
413 // For inline text. These int lists must be the same size; they represent
414 // the start and end character index of each word within this text.
419 [cpp_enum_prefix_override
="ax"] enum AXTextDirection
{
426 // A Java counterpart will be generated for this enum.
427 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.accessibility
428 [cpp_enum_prefix_override
="ax"] enum AXTextStyle
{
430 text_style_italic
= 2,
431 text_style_underline
= 4,
432 text_style_line_through
= 8
435 [cpp_enum_prefix_override
="ax"] enum AXInvalidState
{
438 invalid_state_spelling
,
439 invalid_state_grammar
,
443 [cpp_enum_prefix_override
="ax"] enum AXSortDirection
{
444 sort_direction_unsorted
,
445 sort_direction_ascending
,
446 sort_direction_descending
,