diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 21:59:51 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 21:59:51 +0000 |
commit | d1029c57273282ad53b0291e43d63c40ee5ec841 (patch) | |
tree | a6b2aa433d8c3e8f7faebafde3d85e7ddc1576ee /content/browser/accessibility/browser_accessibility_win.h | |
parent | aae9eeb10159ca2e345408f74d8425a41bb81ab4 (diff) | |
download | chromium_src-d1029c57273282ad53b0291e43d63c40ee5ec841.zip chromium_src-d1029c57273282ad53b0291e43d63c40ee5ec841.tar.gz chromium_src-d1029c57273282ad53b0291e43d63c40ee5ec841.tar.bz2 |
Add support for accessible labels for controls.
This implements TitleUIElement on Mac, and IAccessibleRelation
on Windows.
BUG=89197
TEST=Manual testing with JAWS, NVDA, and VoiceOver.
Review URL: http://codereview.chromium.org/8359012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/accessibility/browser_accessibility_win.h')
-rw-r--r-- | content/browser/accessibility/browser_accessibility_win.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h index dcd53b1..d20b650 100644 --- a/content/browser/accessibility/browser_accessibility_win.h +++ b/content/browser/accessibility/browser_accessibility_win.h @@ -21,6 +21,7 @@ #include "webkit/glue/webaccessibility.h" class BrowserAccessibilityManagerWin; +class BrowserAccessibilityRelation; using webkit_glue::WebAccessibility; @@ -33,7 +34,8 @@ using webkit_glue::WebAccessibility; // to be used by screen readers and other assistive technology (AT). // //////////////////////////////////////////////////////////////////////////////// -class BrowserAccessibilityWin +class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79")) +BrowserAccessibilityWin : public BrowserAccessibility, public CComObjectRootEx<CComMultiThreadModel>, public IDispatchImpl<IAccessible2, &IID_IAccessible2, @@ -179,20 +181,17 @@ class BrowserAccessibilityWin // Get this object's index in its parent object. CONTENT_EXPORT STDMETHODIMP get_indexInParent(LONG* index_in_parent); - // IAccessible2 methods not implemented. - CONTENT_EXPORT STDMETHODIMP get_extendedRole(BSTR* extended_role) { - return E_NOTIMPL; - } - CONTENT_EXPORT STDMETHODIMP get_nRelations(LONG* n_relations) { - return E_NOTIMPL; - } + CONTENT_EXPORT STDMETHODIMP get_nRelations(LONG* n_relations); + CONTENT_EXPORT STDMETHODIMP get_relation(LONG relation_index, - IAccessibleRelation** relation) { - return E_NOTIMPL; - } + IAccessibleRelation** relation); + CONTENT_EXPORT STDMETHODIMP get_relations(LONG max_relations, IAccessibleRelation** relations, - LONG* n_relations) { + LONG* n_relations); + + // IAccessible2 methods not implemented. + CONTENT_EXPORT STDMETHODIMP get_extendedRole(BSTR* extended_role) { return E_NOTIMPL; } CONTENT_EXPORT STDMETHODIMP scrollTo(enum IA2ScrollType scroll_type) { @@ -713,8 +712,12 @@ class BrowserAccessibilityWin // is initialized again but the text doesn't change. string16 old_text_; + // Relationships between this node and other nodes. + std::vector<BrowserAccessibilityRelation*> relations_; + // Give BrowserAccessibility::Create access to our constructor. friend class BrowserAccessibility; + friend class BrowserAccessibilityRelation; DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); }; |