summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmintegration.h
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-06-09 13:10:03 +0200
committerMorten Sørvig <morten.sorvig@qt.io>2022-07-06 17:56:58 +0200
commit9be0f2945d404ceb743e4805f7df388c7fd039f1 (patch)
tree652ea4510f4b1a3ce674364063d4f1b0877ccfb7 /src/plugins/platforms/wasm/qwasmintegration.h
parent25c2d05340eee01cf55457b8327f8f69d408879a (diff)
wasm: begin work on accessibility backend
Implement a11y support by adding html elements of the appropriate type and/or with the appropriate ARIA attribute behind the canvas. Also add a simple manual-test. Change-Id: I2898fb038c1d326135a1341cdee323bc964420bb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.h b/src/plugins/platforms/wasm/qwasmintegration.h
index d996ec3065..db1f928f76 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.h
+++ b/src/plugins/platforms/wasm/qwasmintegration.h
@@ -33,6 +33,7 @@ class QWasmScreen;
class QWasmCompositor;
class QWasmBackingStore;
class QWasmClipboard;
+class QWasmAccessibility;
class QWasmServices;
class QWasmIntegration : public QObject, public QPlatformIntegration
@@ -66,6 +67,9 @@ public:
QPlatformTheme *createPlatformTheme(const QString &name) const override;
QPlatformServices *services() const override;
QPlatformClipboard *clipboard() const override;
+#ifndef QT_NO_ACCESSIBILITY
+ QPlatformAccessibility *accessibility() const override;
+#endif
void initialize() override;
QPlatformInputContext *inputContext() const override;
@@ -94,6 +98,8 @@ private:
mutable QHash<QWindow *, QWasmBackingStore *> m_backingStores;
QList<QPair<emscripten::val, QWasmScreen *>> m_screens;
mutable QWasmClipboard *m_clipboard;
+ mutable QWasmAccessibility *m_accessibility;
+
qreal m_fontDpi = -1;
mutable QScopedPointer<QPlatformInputContext> m_inputContext;
static QWasmIntegration *s_instance;