diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 790563ad1a..f141f9f702 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -344,6 +344,7 @@ QT_BEGIN_NAMESPACE \value NoRole The object has no role. This usually indicates an invalid object. \value PageTab A page tab that the user can select to switch to a different page in a dialog. \value PageTabList A list of page tabs. + \value Paragraph A paragraph of text (usually found in documents). \value Pane A generic container. \value PopupMenu A menu which lists options that the user can select to perform an action. \value ProgressBar The object displays the progress of an operation in progress. @@ -353,6 +354,7 @@ QT_BEGIN_NAMESPACE \value Row A row of cells, usually within a table. \value RowHeader A header for a row of data. \value ScrollBar A scroll bar, which allows the user to scroll the visible area. + \value Section A section (in a document). \value Separator A separator that divides space into logical areas. \value Slider A slider that allows the user to select a value within a given range. \value Sound An object that represents a sound. @@ -368,6 +370,7 @@ QT_BEGIN_NAMESPACE \value Tree A list of items in a tree structure. \value TreeItem An item in a tree structure. \value UserRole The first value to be used for user defined roles. + \value WebDocument HTML document, usually in a browser. \value Whitespace Blank space between other objects. \value Window A top level window. */ diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index eced928069..2da7cf62bf 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -296,6 +296,9 @@ public: LayeredPane = 0x00000080, Terminal = 0x00000081, Desktop = 0x00000082, + Paragraph = 0x00000083, + WebDocument = 0x00000084, + Section = 0x00000085, UserRole = 0x0000ffff }; diff --git a/src/platformsupport/linuxaccessibility/bridge.cpp b/src/platformsupport/linuxaccessibility/bridge.cpp index 612fce501b..3a1e3e0ce0 100644 --- a/src/platformsupport/linuxaccessibility/bridge.cpp +++ b/src/platformsupport/linuxaccessibility/bridge.cpp @@ -244,6 +244,12 @@ static RoleMapping map[] = { //: Role of an accessible object { QAccessible::LayeredPane, ATSPI_ROLE_LAYERED_PANE, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "layered pane") }, //: Role of an accessible object + { QAccessible::WebDocument, ATSPI_ROLE_DOCUMENT_WEB, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "web document") }, + //: Role of an accessible object + { QAccessible::Paragraph, ATSPI_ROLE_PARAGRAPH, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "paragraph") }, + //: Role of an accessible object + { QAccessible::Section, ATSPI_ROLE_SECTION, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "section") }, + //: Role of an accessible object { QAccessible::UserRole, ATSPI_ROLE_UNKNOWN, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "unknown") } }; diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index ca5044fad7..8f83b0fe30 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -149,6 +149,9 @@ static void populateRoleMap() roleMap[QAccessible::ListItem] = NSAccessibilityStaticTextRole; roleMap[QAccessible::Cell] = NSAccessibilityStaticTextRole; roleMap[QAccessible::Client] = NSAccessibilityGroupRole; + roleMap[QAccessible::Paragraph] = NSAccessibilityGroupRole; + roleMap[QAccessible::Section] = NSAccessibilityGroupRole; + roleMap[QAccessible::WebDocument] = NSAccessibilityGroupRole; } /* diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index 64a2891e49..20658f9cad 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -358,6 +358,8 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::role(long *ia2role) case QAccessible::LayeredPane: r = IA2_ROLE_LAYERED_PANE; break; case QAccessible::Terminal: r = IA2_ROLE_TERMINAL; break; case QAccessible::Desktop: r = IA2_ROLE_DESKTOP_PANE; break; + case QAccessible::Paragraph: r = IA2_ROLE_PARAGRAPH; break; + case QAccessible::Section: r = IA2_ROLE_SECTION; break; default: break; } diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index 70445f1e27..d606ecb6a5 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -935,6 +935,8 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accRole(VARIANT varID, VAR // does not support IAccessible2, since it should prefer IA2::role() then. if (role == QAccessible::LayeredPane) role = QAccessible::Pane; + else if (role == QAccessible::WebDocument) + role = QAccessible::Document; else role = QAccessible::Client; }