summaryrefslogtreecommitdiffstats
path: root/src/core/browser_accessibility_qt.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2020-03-06 15:05:50 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2020-03-08 16:17:20 +0100
commitd183801ba254abb859fe5aeb59f3ca05fc5d2a20 (patch)
treec75a072f088379e5e10e89c8994b470fff638ec8 /src/core/browser_accessibility_qt.cpp
parent79f25342cb70fc387453a946174b937c182ece8d (diff)
Update accessibility roles and test after 79-based
Change-Id: I23bd548db07c6332170e9d304977e5974c7f049f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/browser_accessibility_qt.cpp')
-rw-r--r--src/core/browser_accessibility_qt.cpp41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index 7e541d549..d816678e3 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -225,12 +225,15 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::AlertMessage;
case ax::mojom::Role::kAnchor:
return QAccessible::Link;
+
+ // REMINDER: annotation roles are removed from Chromium 80: https://chromium-review.googlesource.com/c/chromium/src/+/1907074
case ax::mojom::Role::kAnnotationAttribution:
case ax::mojom::Role::kAnnotationCommentary:
case ax::mojom::Role::kAnnotationPresence:
case ax::mojom::Role::kAnnotationRevision:
case ax::mojom::Role::kAnnotationSuggestion:
- return QAccessible::Grouping;
+ return QAccessible::Section;
+
case ax::mojom::Role::kApplication:
return QAccessible::Document; // returning Application here makes Qt return the top level app object
case ax::mojom::Role::kArticle:
@@ -286,17 +289,17 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kDetails:
return QAccessible::Grouping;
case ax::mojom::Role::kDesktop:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Pane;
case ax::mojom::Role::kDialog:
return QAccessible::Dialog;
case ax::mojom::Role::kDirectory:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::List;
case ax::mojom::Role::kDisclosureTriangle:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Button;
case ax::mojom::Role::kGenericContainer:
return QAccessible::Section;
case ax::mojom::Role::kDocCover:
- return QAccessible::Graphic;
+ return QAccessible::Graphic;
case ax::mojom::Role::kDocBackLink:
case ax::mojom::Role::kDocBiblioRef:
case ax::mojom::Role::kDocGlossRef:
@@ -335,14 +338,16 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kDocPrologue:
case ax::mojom::Role::kDocPullquote:
case ax::mojom::Role::kDocQna:
+ return QAccessible::Section;
case ax::mojom::Role::kDocSubtitle:
+ return QAccessible::Heading;
case ax::mojom::Role::kDocTip:
case ax::mojom::Role::kDocToc:
return QAccessible::Section;
case ax::mojom::Role::kDocument:
return QAccessible::Document;
case ax::mojom::Role::kEmbeddedObject:
- return QAccessible::Grouping; // FIXME
+ return QAccessible::Grouping;
case ax::mojom::Role::kFeed:
return QAccessible::Section;
case ax::mojom::Role::kFigcaption:
@@ -350,8 +355,9 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kFigure:
return QAccessible::Section;
case ax::mojom::Role::kFooter:
- case ax::mojom::Role::kFooterAsNonLandmark:
return QAccessible::Footer;
+ case ax::mojom::Role::kFooterAsNonLandmark:
+ return QAccessible::Section;
case ax::mojom::Role::kForm:
return QAccessible::Form;
case ax::mojom::Role::kGraphicsDocument:
@@ -365,22 +371,22 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kGroup:
return QAccessible::Grouping;
case ax::mojom::Role::kHeader:
- return QAccessible::Section;
case ax::mojom::Role::kHeaderAsNonLandmark:
+ return QAccessible::Section;
case ax::mojom::Role::kHeading:
return QAccessible::Heading;
case ax::mojom::Role::kIframe:
- return QAccessible::Grouping;
+ return QAccessible::WebDocument;
case ax::mojom::Role::kIframePresentational:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Grouping;
case ax::mojom::Role::kIgnored:
return QAccessible::NoRole;
case ax::mojom::Role::kImage:
return QAccessible::Graphic;
case ax::mojom::Role::kImageMap:
- return QAccessible::Graphic;
+ return QAccessible::Document;
case ax::mojom::Role::kInlineTextBox:
- return QAccessible::EditableText;
+ return QAccessible::StaticText;
case ax::mojom::Role::kInputTime:
return QAccessible::SpinBox;
case ax::mojom::Role::kKeyboard:
@@ -391,8 +397,7 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kLayoutTableCell:
case ax::mojom::Role::kLayoutTableColumn:
case ax::mojom::Role::kLayoutTableRow:
- // No role description.
- return QAccessible::NoRole;
+ return QAccessible::Section;
case ax::mojom::Role::kLegend:
return QAccessible::StaticText;
case ax::mojom::Role::kLineBreak:
@@ -466,12 +471,13 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kRowHeader:
return QAccessible::RowHeader;
case ax::mojom::Role::kRuby:
+ return QAccessible::StaticText;
case ax::mojom::Role::kRubyAnnotation:
return QAccessible::StaticText;
case ax::mojom::Role::kScrollBar:
return QAccessible::ScrollBar;
case ax::mojom::Role::kScrollView:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Pane;
case ax::mojom::Role::kSearch:
return QAccessible::Section;
case ax::mojom::Role::kSearchBox:
@@ -479,9 +485,8 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kSection:
return QAccessible::Section;
case ax::mojom::Role::kSlider:
- return QAccessible::Slider;
case ax::mojom::Role::kSliderThumb:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Slider;
case ax::mojom::Role::kSpinButton:
return QAccessible::SpinBox;
case ax::mojom::Role::kSplitter:
@@ -512,7 +517,7 @@ QAccessible::Role BrowserAccessibilityQt::role() const
case ax::mojom::Role::kTimer:
return QAccessible::Clock;
case ax::mojom::Role::kTitleBar:
- return QAccessible::NoRole; // FIXME
+ return QAccessible::Document;
case ax::mojom::Role::kToggleButton:
return QAccessible::Button;
case ax::mojom::Role::kToolbar: