2007-06-05 15:41:07 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=2:tabstop=2:
|
|
|
|
*/
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is IBM Corporation
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2007
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Aaron Leventhal <aleventh@us.ibm.com>
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "nsARIAMap.h"
|
|
|
|
#include "nsIAccessibleRole.h"
|
|
|
|
#include "nsIAccessibleStates.h"
|
|
|
|
|
2007-09-25 01:56:02 +00:00
|
|
|
#define ARIA_PROPERTY(atom) &nsAccessibilityAtoms::atom,
|
2007-09-25 01:19:03 +00:00
|
|
|
nsIAtom** nsARIAMap::gAriaAtomPtrsNS[eAria_none] = {
|
2007-09-25 01:56:02 +00:00
|
|
|
#include "nsARIAPropertyList.h"
|
2007-09-25 01:19:03 +00:00
|
|
|
};
|
2007-09-25 01:56:02 +00:00
|
|
|
#undef ARIA_PROPERTY
|
2007-09-25 01:19:03 +00:00
|
|
|
|
|
|
|
#define ARIA_PROPERTY(atom) &nsAccessibilityAtoms::aria_##atom,
|
|
|
|
nsIAtom** nsARIAMap::gAriaAtomPtrsHyphenated[eAria_none] = {
|
2007-09-25 01:35:18 +00:00
|
|
|
#include "nsARIAPropertyList.h"
|
2007-09-25 01:19:03 +00:00
|
|
|
};
|
|
|
|
#undef ARIA_PROPERTY
|
|
|
|
|
2007-06-05 15:41:07 +00:00
|
|
|
/**
|
|
|
|
* This list of WAI-defined roles are currently hardcoded.
|
|
|
|
* Eventually we will most likely be loading an RDF resource that contains this information
|
|
|
|
* Using RDF will also allow for role extensibility. See bug 280138.
|
|
|
|
*
|
|
|
|
* Definition of nsRoleMapEntry and nsStateMapEntry contains comments explaining this table.
|
|
|
|
*
|
2007-09-25 01:19:03 +00:00
|
|
|
* When no nsIAccessibleRole enum mapping exists for an ARIA role, the
|
2007-06-05 15:41:07 +00:00
|
|
|
* role will be exposed via the object attribute "xml-roles".
|
|
|
|
* In addition, in MSAA, the unmapped role will also be exposed as a BSTR string role.
|
|
|
|
*
|
|
|
|
* There are no nsIAccessibleRole enums for the following landmark roles:
|
|
|
|
* banner, contentinfo, main, navigation, note, search, secondary, seealso, breadcrumbs
|
|
|
|
*/
|
|
|
|
|
2007-09-25 01:19:03 +00:00
|
|
|
static const nsStateMapEntry kEndEntry = {eAria_none, 0, 0}; // To fill in array of state mappings
|
2007-06-05 15:41:07 +00:00
|
|
|
|
|
|
|
nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|
|
|
{
|
2007-08-04 01:14:09 +00:00
|
|
|
{"alert", nsIAccessibleRole::ROLE_ALERT, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"alertdialog", nsIAccessibleRole::ROLE_ALERT, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"application", nsIAccessibleRole::ROLE_APPLICATION, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"button", nsIAccessibleRole::ROLE_PUSHBUTTON, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_pressed, kBoolState, nsIAccessibleStates::STATE_PRESSED},
|
|
|
|
{eAria_pressed, "mixed", nsIAccessibleStates::STATE_MIXED}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"checkbox", nsIAccessibleRole::ROLE_CHECKBUTTON, eNameOkFromChildren, eNoValue, nsIAccessibleStates::STATE_CHECKABLE,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED},
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"columnheader", nsIAccessibleRole::ROLE_COLUMNHEADER, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-09-18 21:48:04 +00:00
|
|
|
{"combobox", nsIAccessibleRole::ROLE_COMBOBOX, eNameLabelOrTitle, eHasValueMinMax,
|
|
|
|
nsIAccessibleStates::STATE_COLLAPSED | nsIAccessibleStates::STATE_HASPOPUP,
|
|
|
|
// Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aaa:autocomplete
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
|
|
|
{eAria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"description", nsIAccessibleRole::ROLE_TEXT_CONTAINER, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"dialog", nsIAccessibleRole::ROLE_DIALOG, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"document", nsIAccessibleRole::ROLE_DOCUMENT, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"grid", nsIAccessibleRole::ROLE_TABLE, eNameLabelOrTitle, eNoValue, nsIAccessibleStates::STATE_FOCUSABLE,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"gridcell", nsIAccessibleRole::ROLE_CELL, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
|
|
|
|
{eAria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"group", nsIAccessibleRole::ROLE_GROUPING, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-08-04 02:15:52 +00:00
|
|
|
{"heading", nsIAccessibleRole::ROLE_HEADING, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"img", nsIAccessibleRole::ROLE_GRAPHIC, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"label", nsIAccessibleRole::ROLE_LABEL, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"link", nsIAccessibleRole::ROLE_LINK, eNameOkFromChildren, eNoValue, nsIAccessibleStates::STATE_LINKED,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"list", nsIAccessibleRole::ROLE_LIST, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
|
|
|
{eAria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"listbox", nsIAccessibleRole::ROLE_LIST, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
|
|
|
{eAria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"listitem", nsIAccessibleRole::ROLE_LISTITEM, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE}, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"menu", nsIAccessibleRole::ROLE_MENUPOPUP, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"menubar", nsIAccessibleRole::ROLE_MENUBAR, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"menuitem", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE}, kEndEntry},
|
2007-09-19 00:46:06 +00:00
|
|
|
{"menuitemcheckbox", nsIAccessibleRole::ROLE_CHECK_MENU_ITEM, eNameOkFromChildren, eNoValue, nsIAccessibleStates::STATE_CHECKABLE,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED },
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED}, kEndEntry},
|
2007-09-19 00:46:06 +00:00
|
|
|
{"menuitemradio", nsIAccessibleRole::ROLE_RADIO_MENU_ITEM, eNameOkFromChildren, eNoValue, nsIAccessibleStates::STATE_CHECKABLE,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED }, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"option", nsIAccessibleRole::ROLE_LISTITEM, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE}, kEndEntry},
|
2007-11-12 01:05:37 +00:00
|
|
|
{"presentation", nsIAccessibleRole::ROLE_NOTHING, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"progressbar", nsIAccessibleRole::ROLE_PROGRESSBAR, eNameLabelOrTitle, eHasValueMinMax, nsIAccessibleStates::STATE_READONLY,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"radio", nsIAccessibleRole::ROLE_RADIOBUTTON, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED}, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"radiogroup", nsIAccessibleRole::ROLE_GROUPING, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-08-04 02:15:52 +00:00
|
|
|
{"region", nsIAccessibleRole::ROLE_PANE, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-07-04 07:52:18 +00:00
|
|
|
{"row", nsIAccessibleRole::ROLE_ROW, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
|
|
|
|
{eAria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"rowheader", nsIAccessibleRole::ROLE_ROWHEADER, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-08-04 02:15:52 +00:00
|
|
|
{"section", nsIAccessibleRole::ROLE_SECTION, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"separator", nsIAccessibleRole::ROLE_SEPARATOR, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"slider", nsIAccessibleRole::ROLE_SLIDER, eNameLabelOrTitle, eHasValueMinMax, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"spinbutton", nsIAccessibleRole::ROLE_SPINBUTTON, eNameLabelOrTitle, eHasValueMinMax, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"status", nsIAccessibleRole::ROLE_STATUSBAR, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"tab", nsIAccessibleRole::ROLE_PAGETAB, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"tablist", nsIAccessibleRole::ROLE_PAGETABLIST, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
|
|
|
{"tabpanel", nsIAccessibleRole::ROLE_PROPERTYPAGE, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
|
2007-08-04 01:17:49 +00:00
|
|
|
{"textbox", nsIAccessibleRole::ROLE_ENTRY, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-07-06 07:49:22 +00:00
|
|
|
// Manually map EXT_STATE_SINGLE_LINE and EXT_STATE_MULTI_LINE FROM aaa:multiline
|
2007-09-18 21:48:04 +00:00
|
|
|
// Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aaa:autocomplete
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_autocomplete, "list", nsIAccessibleStates::STATE_HASPOPUP},
|
|
|
|
{eAria_autocomplete, "both", nsIAccessibleStates::STATE_HASPOPUP},
|
|
|
|
{eAria_secret, kBoolState, nsIAccessibleStates::STATE_PROTECTED},
|
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry},
|
2007-07-06 07:49:22 +00:00
|
|
|
{"toolbar", nsIAccessibleRole::ROLE_TOOLBAR, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, kEndEntry},
|
2007-08-04 02:15:52 +00:00
|
|
|
{"tooltip", nsIAccessibleRole::ROLE_TOOLTIP, eNameOkFromChildren, eNoValue, kNoReqStates, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"tree", nsIAccessibleRole::ROLE_OUTLINE, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
|
|
|
{eAria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE}, kEndEntry},
|
2007-07-04 07:52:18 +00:00
|
|
|
{"treegrid", nsIAccessibleRole::ROLE_TREE_TABLE, eNameLabelOrTitle, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY},
|
|
|
|
{eAria_multiselectable, kBoolState, nsIAccessibleStates::STATE_MULTISELECTABLE | nsIAccessibleStates::STATE_EXTSELECTABLE}, kEndEntry},
|
2007-06-05 15:41:07 +00:00
|
|
|
{"treeitem", nsIAccessibleRole::ROLE_OUTLINEITEM, eNameOkFromChildren, eNoValue, kNoReqStates,
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE},
|
|
|
|
{eAria_selected, kBoolState, nsIAccessibleStates::STATE_SELECTED | nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_selected, "false", nsIAccessibleStates::STATE_SELECTABLE},
|
|
|
|
{eAria_expanded, kBoolState, nsIAccessibleStates::STATE_EXPANDED},
|
|
|
|
{eAria_expanded, "false", nsIAccessibleStates::STATE_COLLAPSED},
|
|
|
|
{eAria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
|
|
|
|
{eAria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE},},
|
2007-11-12 01:05:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
PRUint32 nsARIAMap::gWAIRoleMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIRoleMap);
|
|
|
|
|
|
|
|
nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = {
|
|
|
|
"",
|
|
|
|
nsIAccessibleRole::ROLE_NOTHING,
|
|
|
|
eNameLabelOrTitle,
|
|
|
|
eNoValue,
|
|
|
|
kNoReqStates,
|
|
|
|
kEndEntry
|
2007-06-05 15:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Universal states:
|
|
|
|
* The following state rules are applied to any accessible element,
|
|
|
|
* whether there is an ARIA role or not:
|
|
|
|
*/
|
|
|
|
nsStateMapEntry nsARIAMap::gWAIUnivStateMap[] = {
|
2007-09-25 01:19:03 +00:00
|
|
|
{eAria_required, kBoolState, nsIAccessibleStates::STATE_REQUIRED},
|
|
|
|
{eAria_invalid, kBoolState, nsIAccessibleStates::STATE_INVALID},
|
|
|
|
{eAria_haspopup, kBoolState, nsIAccessibleStates::STATE_HASPOPUP},
|
|
|
|
{eAria_busy, "true", nsIAccessibleStates::STATE_BUSY},
|
|
|
|
{eAria_busy, "error", nsIAccessibleStates::STATE_INVALID},
|
2007-06-05 15:41:07 +00:00
|
|
|
kEndEntry
|
|
|
|
};
|
|
|
|
|