aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-06-13 11:56:45 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-06-13 12:18:41 +0200
commit761df2ced0081905b4238c66783bb276f504cf3d (patch)
tree36ac08aec5beb02d46457cad6c05c27b8b0eb6c5 /src
parent335314146dece4fa86c661a4094a2f73e5e81a43 (diff)
Accessibility: Switch should have checkbox as role
Fixes: QTBUG-76356 Change-Id: I8f8e8331adbe741be2c893f2140d793d1b901434 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickabstractbutton.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp
index a2992191..0aa8ec28 100644
--- a/src/quicktemplates2/qquickabstractbutton.cpp
+++ b/src/quicktemplates2/qquickabstractbutton.cpp
@@ -1157,6 +1157,10 @@ void QQuickAbstractButton::accessibilityActiveChanged(bool active)
QAccessible::Role QQuickAbstractButton::accessibleRole() const
{
+ Q_D(const QQuickAbstractButton);
+ if (d->checkable) {
+ return QAccessible::CheckBox;
+ }
return QAccessible::Button;
}
#endif