javafx.scene.AccessibleRole Maven / Gradle / Ivy
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javafx.scene;
/**
* This enum describes the accessible role for a {@link Node}.
*
* The role is used by assistive technologies such as screen readers
* to decide the set of actions and attributes for a node. For example,
* when the screen reader needs the current value of a slider, it
* will request it using the value attribute. When the screen reader
* changes the value of the slider, it will use an action to set
* the current value of the slider. The slider must respond
* appropriately to both these requests.
*
* @see Node#setAccessibleRole(AccessibleRole)
* @see Node#getAccessibleRole()
* @see AccessibleAttribute#ROLE
* @see Node#queryAccessibleAttribute(AccessibleAttribute, Object...)
* @see Node#executeAccessibleAction(AccessibleAction, Object...)
*
* @since JavaFX 8u40
*/
public enum AccessibleRole {
/**
* Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
BUTTON,
/**
* Check Box role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
* - {@link AccessibleAttribute#INDETERMINATE}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
CHECK_BOX,
/**
* Check Menu Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#ACCELERATOR}
* - {@link AccessibleAttribute#MNEMONIC}
* - {@link AccessibleAttribute#DISABLED}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
CHECK_MENU_ITEM,
/**
* Combo Box role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#EXPANDED}
* - {@link AccessibleAttribute#EDITABLE}
*
* Actions:
*
* - {@link AccessibleAction#EXPAND}
* - {@link AccessibleAction#COLLAPSE}
*
*/
COMBO_BOX,
/**
* Context Menu role.
*
* Attributes:
*
* - {@link AccessibleAttribute#PARENT_MENU}
* - {@link AccessibleAttribute#VISIBLE}
*
*/
CONTEXT_MENU,
/**
* Date Picker role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#DATE}
*
*/
DATE_PICKER,
/**
* Decrement Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
DECREMENT_BUTTON,
/**
* Hyperlink role.
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#VISITED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
HYPERLINK,
/**
* Increment Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
INCREMENT_BUTTON,
/**
* Image View role.
*
* Attributes:
* Actions:
*
* It is strongly recommended that a text description of the image be provided
* for each {@link javafx.scene.image.ImageView}. This can be done by setting either
* {@link Node#accessibleTextProperty()} for the {@link javafx.scene.image.ImageView}
* or by using {@link AccessibleAttribute#LABELED_BY}.
*
*/
IMAGE_VIEW,
/**
* List View role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ITEM_AT_INDEX}
* - {@link AccessibleAttribute#ITEM_COUNT}
* - {@link AccessibleAttribute#SELECTED_ITEMS}
* - {@link AccessibleAttribute#MULTIPLE_SELECTION}
* - {@link AccessibleAttribute#VERTICAL_SCROLLBAR}
* - {@link AccessibleAttribute#HORIZONTAL_SCROLLBAR}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*
* - {@link AccessibleAction#SHOW_ITEM}
* - {@link AccessibleAction#SET_SELECTED_ITEMS}
*
*/
LIST_VIEW,
/**
* List Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#INDEX}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
LIST_ITEM,
/**
* Menu role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#ACCELERATOR}
* - {@link AccessibleAttribute#MNEMONIC}
* - {@link AccessibleAttribute#DISABLED}
* - {@link AccessibleAttribute#SUBMENU}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
MENU,
/**
* Menu Bar role.
*
* Attributes:
*
*
* Actions:
*
*/
MENU_BAR,
/**
* Menu Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
MENU_BUTTON,
/**
* Menu Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#ACCELERATOR}
* - {@link AccessibleAttribute#MNEMONIC}
* - {@link AccessibleAttribute#DISABLED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
MENU_ITEM,
/**
* Node role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ROLE}
* - {@link AccessibleAttribute#PARENT}
* - {@link AccessibleAttribute#SCENE}
* - {@link AccessibleAttribute#BOUNDS}
* - {@link AccessibleAttribute#DISABLED}
* - {@link AccessibleAttribute#FOCUSED}
* - {@link AccessibleAttribute#VISIBLE}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
* Optional Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#LABELED_BY}
* - {@link AccessibleAttribute#ROLE_DESCRIPTION}
* - {@link AccessibleAttribute#HELP}
*
* Optional Actions:
*
* - {@link AccessibleAction#SHOW_MENU}
*
*/
NODE,
/**
* Page role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
PAGE_ITEM,
/**
* Pagination role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ITEM_AT_INDEX}
* - {@link AccessibleAttribute#ITEM_COUNT}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*/
PAGINATION,
/**
* Parent role.
*
* Attributes:
*
* - {@link AccessibleAttribute#CHILDREN}
*
* Actions:
*/
PARENT,
/**
* Password Field role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT} - must return null or empty string
*
* Actions:
*/
PASSWORD_FIELD,
/**
* Progress Indicator role.
*
* Attributes:
*
* - {@link AccessibleAttribute#VALUE}
* - {@link AccessibleAttribute#MIN_VALUE}
* - {@link AccessibleAttribute#MAX_VALUE}
* - {@link AccessibleAttribute#INDETERMINATE}
*
* Actions:
*/
PROGRESS_INDICATOR,
/**
* Radio Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
RADIO_BUTTON,
/**
* Radio Menu Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#ACCELERATOR}
* - {@link AccessibleAttribute#MNEMONIC}
* - {@link AccessibleAttribute#DISABLED}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
RADIO_MENU_ITEM,
/**
* Slider role.
*
* Attributes:
*
* - {@link AccessibleAttribute#VALUE}
* - {@link AccessibleAttribute#MIN_VALUE}
* - {@link AccessibleAttribute#MAX_VALUE}
* - {@link AccessibleAttribute#ORIENTATION}
*
* Actions:
*
* - {@link AccessibleAction#INCREMENT}
* - {@link AccessibleAction#DECREMENT}
* - {@link AccessibleAction#SET_VALUE}
*
*/
SLIDER,
/**
* Spinner role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
*
* Actions:
*
* - {@link AccessibleAction#INCREMENT}
* - {@link AccessibleAction#DECREMENT}
*
*/
SPINNER,
/**
* Text role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#FONT}
*
* Actions:
*
* - {@link AccessibleAction#SET_TEXT}
*
*/
TEXT,
/**
* Text Area role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#FONT}
* - {@link AccessibleAttribute#EDITABLE}
* - {@link AccessibleAttribute#SELECTION_START}
* - {@link AccessibleAttribute#SELECTION_END}
* - {@link AccessibleAttribute#CARET_OFFSET}
* - {@link AccessibleAttribute#OFFSET_AT_POINT}
* - {@link AccessibleAttribute#LINE_START}
* - {@link AccessibleAttribute#LINE_END}
* - {@link AccessibleAttribute#LINE_FOR_OFFSET}
* - {@link AccessibleAttribute#BOUNDS_FOR_RANGE}
*
* Actions:
*
* - {@link AccessibleAction#SET_TEXT}
* - {@link AccessibleAction#SET_TEXT_SELECTION}
*
*/
TEXT_AREA,
/**
* Text Field role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#FONT}
* - {@link AccessibleAttribute#EDITABLE}
* - {@link AccessibleAttribute#SELECTION_START}
* - {@link AccessibleAttribute#SELECTION_END}
* - {@link AccessibleAttribute#CARET_OFFSET}
* - {@link AccessibleAttribute#OFFSET_AT_POINT}
* - {@link AccessibleAttribute#BOUNDS_FOR_RANGE}
*
* Actions:
*
* - {@link AccessibleAction#SET_TEXT}
* - {@link AccessibleAction#SET_TEXT_SELECTION}
*
*/
TEXT_FIELD,
/**
* Toggle Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
*
*/
TOGGLE_BUTTON,
/**
* Tooltip role.
*
* Attributes:
* Actions:
*/
TOOLTIP,
/**
* Scroll Bar role.
*
* Attributes:
*
* - {@link AccessibleAttribute#VALUE}
* - {@link AccessibleAttribute#MAX_VALUE}
* - {@link AccessibleAttribute#MIN_VALUE}
* - {@link AccessibleAttribute#ORIENTATION}
*
* Actions:
*
* - {@link AccessibleAction#INCREMENT}
* - {@link AccessibleAction#DECREMENT}
* - {@link AccessibleAction#BLOCK_INCREMENT}
* - {@link AccessibleAction#BLOCK_DECREMENT}
* - {@link AccessibleAction#SET_VALUE}
*
*/
SCROLL_BAR,
/**
* Scroll Pane role.
*
* Attributes:
*
* - {@link AccessibleAttribute#CONTENTS}
* - {@link AccessibleAttribute#HORIZONTAL_SCROLLBAR}
* - {@link AccessibleAttribute#VERTICAL_SCROLLBAR}
*
* Actions:
*/
SCROLL_PANE,
/**
* Split Menu Button role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#EXPANDED}
*
* Actions:
*
* - {@link AccessibleAction#FIRE}
* - {@link AccessibleAction#EXPAND}
* - {@link AccessibleAction#COLLAPSE}
*
*/
SPLIT_MENU_BUTTON,
/**
* Tab Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
TAB_ITEM,
/**
* Tab Pane role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ITEM_AT_INDEX}
* - {@link AccessibleAttribute#ITEM_COUNT}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*/
TAB_PANE,
/**
* Table Cell role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#ROW_INDEX}
* - {@link AccessibleAttribute#COLUMN_INDEX}
* - {@link AccessibleAttribute#SELECTED}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
TABLE_CELL,
/**
* Table Column role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#INDEX}
*
* Actions:
*/
TABLE_COLUMN,
/**
* Table Row role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#INDEX}
*
* Actions:
*/
TABLE_ROW,
/**
* Table View role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ROW_COUNT}
* - {@link AccessibleAttribute#ROW_AT_INDEX}
* - {@link AccessibleAttribute#COLUMN_COUNT}
* - {@link AccessibleAttribute#COLUMN_AT_INDEX}
* - {@link AccessibleAttribute#SELECTED_ITEMS}
* - {@link AccessibleAttribute#CELL_AT_ROW_COLUMN}
* - {@link AccessibleAttribute#HEADER}
* - {@link AccessibleAttribute#MULTIPLE_SELECTION}
* - {@link AccessibleAttribute#VERTICAL_SCROLLBAR}
* - {@link AccessibleAttribute#HORIZONTAL_SCROLLBAR}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*
* - {@link AccessibleAction#SHOW_ITEM}
* - {@link AccessibleAction#SET_SELECTED_ITEMS}
*
*/
TABLE_VIEW,
/**
* Thumb role.
*
* Attributes:
*
* - {@link AccessibleAttribute#VALUE}
*
* Actions:
*/
THUMB,
/**
* Titled Pane role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#EXPANDED}
*
* Actions:
*
* - {@link AccessibleAction#EXPAND}
* - {@link AccessibleAction#COLLAPSE}
*
*/
TITLED_PANE,
/**
* Tool Bar role.
*
* Attributes:
*
* - {@link AccessibleAttribute#OVERFLOW_BUTTON}
*
* Actions:
*/
TOOL_BAR,
/**
* Tree Item role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#INDEX}
* - {@link AccessibleAttribute#SELECTED}
* - {@link AccessibleAttribute#EXPANDED}
* - {@link AccessibleAttribute#LEAF}
* - {@link AccessibleAttribute#DISCLOSURE_LEVEL}
* - {@link AccessibleAttribute#TREE_ITEM_COUNT}
* - {@link AccessibleAttribute#TREE_ITEM_AT_INDEX}
* - {@link AccessibleAttribute#TREE_ITEM_PARENT}
*
* Actions:
*
* - {@link AccessibleAction#EXPAND}
* - {@link AccessibleAction#COLLAPSE}
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
TREE_ITEM,
/**
* Tree Table Cell role.
*
* Attributes:
*
* - {@link AccessibleAttribute#TEXT}
* - {@link AccessibleAttribute#SELECTED}
* - {@link AccessibleAttribute#ROW_INDEX}
* - {@link AccessibleAttribute#COLUMN_INDEX}
*
* Actions:
*
* - {@link AccessibleAction#REQUEST_FOCUS}
*
*/
TREE_TABLE_CELL,
/**
* Tree Table Row role.
*
* Attributes:
*
* - {@link AccessibleAttribute#INDEX}
* - {@link AccessibleAttribute#EXPANDED}
* - {@link AccessibleAttribute#LEAF}
* - {@link AccessibleAttribute#DISCLOSURE_LEVEL}
* - {@link AccessibleAttribute#TREE_ITEM_COUNT}
* - {@link AccessibleAttribute#TREE_ITEM_AT_INDEX}
* - {@link AccessibleAttribute#TREE_ITEM_PARENT}
*
* Actions:
*
* - {@link AccessibleAction#EXPAND}
* - {@link AccessibleAction#COLLAPSE}
*
*/
TREE_TABLE_ROW,
/**
* Tree Table View role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ROW_COUNT}
* - {@link AccessibleAttribute#ROW_AT_INDEX}
* - {@link AccessibleAttribute#COLUMN_COUNT}
* - {@link AccessibleAttribute#COLUMN_AT_INDEX}
* - {@link AccessibleAttribute#SELECTED_ITEMS}
* - {@link AccessibleAttribute#CELL_AT_ROW_COLUMN}
* - {@link AccessibleAttribute#HEADER}
* - {@link AccessibleAttribute#MULTIPLE_SELECTION}
* - {@link AccessibleAttribute#VERTICAL_SCROLLBAR}
* - {@link AccessibleAttribute#HORIZONTAL_SCROLLBAR}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*
* - {@link AccessibleAction#SHOW_ITEM}
* - {@link AccessibleAction#SET_SELECTED_ITEMS}
*
*/
TREE_TABLE_VIEW,
/**
* Tree View role.
*
* Attributes:
*
* - {@link AccessibleAttribute#ROW_COUNT}
* - {@link AccessibleAttribute#ROW_AT_INDEX}
* - {@link AccessibleAttribute#SELECTED_ITEMS}
* - {@link AccessibleAttribute#MULTIPLE_SELECTION}
* - {@link AccessibleAttribute#VERTICAL_SCROLLBAR}
* - {@link AccessibleAttribute#HORIZONTAL_SCROLLBAR}
* - {@link AccessibleAttribute#FOCUS_ITEM}
*
* Actions:
*
* - {@link AccessibleAction#SHOW_ITEM}
* - {@link AccessibleAction#SET_SELECTED_ITEMS}
*
*/
TREE_VIEW,
}