From c8513c8188a9194b0300fa1740f7fdd5172284d2 Mon Sep 17 00:00:00 2001 From: Sharad Sahu Date: Wed, 8 Jun 2022 17:20:41 +0530 Subject: wasm: Work on wasm accessibility elements and events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement a11y support by adding html elements (Toolbar, Menu, DialogBox) and events of the appropriate type and/or with the appropriate ARIA attribute behind the canvas. Change-Id: If9c9fbff9a451b44e57de5d8834f4a78f33f41bc Reviewed-by: Morten Johan Sørvig (cherry picked from commit 13c3fd959ed400396ee770d3e300778cf20a50a9) Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/wasm/qwasmaccessibility.cpp | 128 ++++++++++++++++++++- src/plugins/platforms/wasm/qwasmaccessibility.h | 8 ++ .../manual/wasm/a11y/basic_widgets/CMakeLists.txt | 4 + .../wasm/a11y/basic_widgets/basica11ywidget.cpp | 114 ++++++++++++++++++ .../wasm/a11y/basic_widgets/basica11ywidget.h | 41 +++++++ tests/manual/wasm/a11y/basic_widgets/main.cpp | 24 +--- .../manual/wasm/a11y/basic_widgets/tabswidget.cpp | 63 ++++++++++ tests/manual/wasm/a11y/basic_widgets/tabswidget.h | 34 ++++++ 8 files changed, 392 insertions(+), 24 deletions(-) create mode 100644 tests/manual/wasm/a11y/basic_widgets/basica11ywidget.cpp create mode 100644 tests/manual/wasm/a11y/basic_widgets/basica11ywidget.h create mode 100644 tests/manual/wasm/a11y/basic_widgets/tabswidget.cpp create mode 100644 tests/manual/wasm/a11y/basic_widgets/tabswidget.h diff --git a/src/plugins/platforms/wasm/qwasmaccessibility.cpp b/src/plugins/platforms/wasm/qwasmaccessibility.cpp index cb1e3f135c0..552f7846ea8 100644 --- a/src/plugins/platforms/wasm/qwasmaccessibility.cpp +++ b/src/plugins/platforms/wasm/qwasmaccessibility.cpp @@ -140,7 +140,7 @@ emscripten::val QWasmAccessibility::createHtmlElement(QAccessibleInterface *ifac // Translate the Qt a11y elemen role into html element type + ARIA role. // Here we can either create
elements with a spesific ARIA role, // or create e.g.