From 13c3fd959ed400396ee770d3e300778cf20a50a9 Mon Sep 17 00:00:00 2001 From: Sharad Sahu Date: Wed, 8 Jun 2022 17:20:41 +0530 Subject: [PATCH] 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. Pick-to: 6.5 Change-Id: If9c9fbff9a451b44e57de5d8834f4a78f33f41bc Reviewed-by: Morten Johan Sørvig --- .../platforms/wasm/qwasmaccessibility.cpp | 126 +++++++++++++++++- .../platforms/wasm/qwasmaccessibility.h | 8 ++ .../wasm/a11y/basic_widgets/CMakeLists.txt | 4 + .../a11y/basic_widgets/basica11ywidget.cpp | 114 ++++++++++++++++ .../wasm/a11y/basic_widgets/basica11ywidget.h | 41 ++++++ tests/manual/wasm/a11y/basic_widgets/main.cpp | 24 +--- .../wasm/a11y/basic_widgets/tabswidget.cpp | 63 +++++++++ .../wasm/a11y/basic_widgets/tabswidget.h | 34 +++++ 8 files changed, 391 insertions(+), 23 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.