Morten Sørvig 9be0f2945d 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>
2022-07-06 17:56:58 +02:00

34 lines
708 B
C++

// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtWidgets>
class BasicA11yWidget: public QWidget
{
public:
BasicA11yWidget() {
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(new QLabel("This is a text label"));
layout->addWidget(new QPushButton("This is a push button"));
layout->addWidget(new QCheckBox("This is a check box"));
// TODO: Add more widgets
layout->addStretch();
setLayout(layout);
}
};
int main(int argc, char **argv)
{
QApplication app(argc, argv);
BasicA11yWidget a11yWidget;
a11yWidget.show();
return app.exec();
}