diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 16:54:36 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 16:54:36 +0000 |
commit | aef9284447e6e63d30448481e8cdf01ba1ecdf22 (patch) | |
tree | 994a27fd137aac90b92c81cc77880387be52dbd0 /webkit/glue/webaccessibility.h | |
parent | 8ddbd66ab581984c87b8b52465c96e349ebcfb5f (diff) | |
download | chromium_src-aef9284447e6e63d30448481e8cdf01ba1ecdf22.zip chromium_src-aef9284447e6e63d30448481e8cdf01ba1ecdf22.tar.gz chromium_src-aef9284447e6e63d30448481e8cdf01ba1ecdf22.tar.bz2 |
Windows accessibility improvements: 1. All WebKit roles are now passed to the
browser and then converted to MSAA roles - this is both because the
logic needs to be more complicated, and so we can support Mac accessibility,
too. 2. The serializable object used to pass accessibility info from the
renderer to the browser now uses a map for uncommon attributes, rather than
having a bunch of fields that are almost always empty. 3. Handles the
accSelect method with TAKE_FOCUS, allowing assistive technology to set focus
to a particular control. 4. Implements several other IAccessible2 interfaces.
BUG=25564
BUG=13291
TEST=None
Review URL: http://codereview.chromium.org/2121004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47922 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webaccessibility.h')
-rw-r--r-- | webkit/glue/webaccessibility.h | 117 |
1 files changed, 95 insertions, 22 deletions
diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h index ea000e7..305bc0ca 100644 --- a/webkit/glue/webaccessibility.h +++ b/webkit/glue/webaccessibility.h @@ -5,6 +5,7 @@ #ifndef WEBKIT_GLUE_WEBACCESSIBILITY_H_ #define WEBKIT_GLUE_WEBACCESSIBILITY_H_ +#include <map> #include <vector> #include "base/string16.h" @@ -27,37 +28,102 @@ struct WebAccessibility { enum Role { ROLE_NONE = 0, + ROLE_UNKNOWN, + + ROLE_ALERT, + ROLE_ALERT_DIALOG, + ROLE_ANNOTATION, ROLE_APPLICATION, + ROLE_ARTICLE, + ROLE_BROWSER, + ROLE_BUSY_INDICATOR, + ROLE_BUTTON, ROLE_CELL, - ROLE_CHECKBUTTON, - ROLE_CLIENT, + ROLE_CHECKBOX, + ROLE_COLOR_WELL, ROLE_COLUMN, - ROLE_COLUMNHEADER, + ROLE_COLUMN_HEADER, + ROLE_COMBO_BOX, + ROLE_DEFINITION_LIST_DEFINITION, + ROLE_DEFINITION_LIST_TERM, + ROLE_DIALOG, + ROLE_DIRECTORY, + ROLE_DISCLOSURE_TRIANGLE, ROLE_DOCUMENT, - ROLE_GRAPHIC, - ROLE_GROUPING, + ROLE_DRAWER, + ROLE_EDITABLE_TEXT, + ROLE_GRID, + ROLE_GROUP, + ROLE_GROW_AREA, + ROLE_HEADING, + ROLE_HELP_TAG, + ROLE_IGNORED, + ROLE_IMAGE, + ROLE_IMAGE_MAP, + ROLE_IMAGE_MAP_LINK, + ROLE_INCREMENTOR, + ROLE_LANDMARK_APPLICATION, + ROLE_LANDMARK_BANNER, + ROLE_LANDMARK_COMPLEMENTARY, + ROLE_LANDMARK_CONTENTINFO, + ROLE_LANDMARK_MAIN, + ROLE_LANDMARK_NAVIGATION, + ROLE_LANDMARK_SEARCH, ROLE_LINK, ROLE_LIST, ROLE_LISTBOX, - ROLE_LISTITEM, - ROLE_MENUBAR, - ROLE_MENUITEM, - ROLE_MENUPOPUP, + ROLE_LISTBOX_OPTION, + ROLE_LIST_ITEM, + ROLE_LIST_MARKER, + ROLE_LOG, + ROLE_MARQUEE, + ROLE_MATH, + ROLE_MATTE, + ROLE_MENU, + ROLE_MENU_BAR, + ROLE_MENU_ITEM, + ROLE_MENU_BUTTON, + ROLE_MENU_LIST_OPTION, + ROLE_MENU_LIST_POPUP, + ROLE_NOTE, ROLE_OUTLINE, - ROLE_PAGETABLIST, - ROLE_PROGRESSBAR, - ROLE_PUSHBUTTON, - ROLE_RADIOBUTTON, + ROLE_POPUP_BUTTON, + ROLE_PROGRESS_INDICATOR, + ROLE_RADIO_BUTTON, + ROLE_RADIO_GROUP, + ROLE_REGION, ROLE_ROW, - ROLE_ROWHEADER, - ROLE_SEPARATOR, + ROLE_ROW_HEADER, + ROLE_RULER, + ROLE_RULER_MARKER, + ROLE_SCROLLAREA, + ROLE_SCROLLBAR, + ROLE_SHEET, ROLE_SLIDER, - ROLE_STATICTEXT, - ROLE_STATUSBAR, + ROLE_SLIDER_THUMB, + ROLE_SPLITTER, + ROLE_SPLIT_GROUP, + ROLE_STATIC_TEXT, + ROLE_STATUS, + ROLE_SYSTEM_WIDE, + ROLE_TAB, ROLE_TABLE, - ROLE_TEXT, + ROLE_TABLE_HEADER_CONTAINER, + ROLE_TAB_GROUP, + ROLE_TAB_LIST, + ROLE_TAB_PANEL, + ROLE_TEXTAREA, + ROLE_TEXT_FIELD, + ROLE_TIMER, ROLE_TOOLBAR, ROLE_TOOLTIP, + ROLE_TREE, + ROLE_TREE_GRID, + ROLE_TREE_ITEM, + ROLE_VALUE_INDICATOR, + ROLE_WEBCORE_LINK, + ROLE_WEB_AREA, + ROLE_WINDOW, NUM_ROLES }; @@ -81,6 +147,16 @@ struct WebAccessibility { STATE_UNAVAILABLE }; + enum Attribute { + ATTR_ACTION, + ATTR_DESCRIPTION, + ATTR_HELP, + ATTR_HTML_TAG, + ATTR_LINK_TARGET, + ATTR_SHORTCUT, + NUM_ATTRIBUTES + }; + // Empty constructor, for serialization. WebAccessibility(); @@ -99,13 +175,10 @@ struct WebAccessibility { int32 id; string16 name; string16 value; - string16 action; - string16 description; - string16 help; - string16 shortcut; Role role; uint32 state; WebKit::WebRect location; + std::map<int32, string16> attributes; std::vector<WebAccessibility> children; }; |