summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Schwan <carl.schwan@kdab.com>2023-04-15 15:24:50 +0200
committerCarl Schwan <carl.schwan@kdab.com>2023-04-22 17:03:42 +0200
commit645289a9582727bf0f3493d2ec5c07d0a426ed62 (patch)
treea6c374a44e88775585b112175088718165816985
parentef123933c9537ce1418f0e293d7dbf22f7af9e49 (diff)
Enable accessibility by default on Linux
Previously this was disabled unless the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY was set, as the debian packaging was always enabling accessibility[1] even if a screen reader was not enabled. This is not the case anymore since 5 years ago[2] and now accessibility will only be enabled if a screen reader is detected. Which is the correct upstream behavior of at-spi2-core. So now enable accessibility unless QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY is set to 0 [1]: https://salsa.debian.org/a11y-team/at-spi2-core/-/commit/2a99b7b40526bbdf091cc574ec08d86c9a46f405 [2]: https://salsa.debian.org/a11y-team/at-spi2-core/-/commit/fde0bbead6aacefd0b5dcf9f6d36f7f50a2c0f3d Change-Id: Ie5554f8b578dcca87a54dad525ae6a83d6f8f9d8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 8f06b3e970f768f6a5776845c83090f1fc8b0162)
-rw-r--r--src/core/accessibility_activation_observer.cpp9
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc10
2 files changed, 9 insertions, 10 deletions
diff --git a/src/core/accessibility_activation_observer.cpp b/src/core/accessibility_activation_observer.cpp
index 833190844..b9d73cb68 100644
--- a/src/core/accessibility_activation_observer.cpp
+++ b/src/core/accessibility_activation_observer.cpp
@@ -48,12 +48,13 @@ namespace QtWebEngineCore {
namespace {
bool isAccessibilityEnabled() {
- // On Linux accessibility is disabled by default due to performance issues,
- // and can be re-enabled by setting the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment
- // variable. For details, see QTBUG-59922.
+ // On Linux accessibility can be disabled due to performance issues by setting the
+ // QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment variable to 0. For details,
+ // see QTBUG-59922.
#ifdef Q_OS_LINUX
static bool accessibility_enabled
- = qEnvironmentVariableIsSet("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY");
+ = qEnvironmentVariable("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY", QLatin1String("1"))
+ == QLatin1String("1");
#else
const bool accessibility_enabled = true;
#endif
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index e32424eea..6b450b98c 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -221,13 +221,11 @@
or VoiceOver on \macos.
\endlist
- Due to some limitations, the Linux QPA plugin almost always reports that accessibility should
- be activated. On big HTML pages, this can cause a significant slowdown in rendering speed.
+ On some old Linux configurations, accessibility can cause a significant slowdown
+ on large HTML pages.
- Because of that, from Qt 5.9 onwards, \QWE accessibility support is disabled by default
- on Linux.
- It can be re-enabled by setting the \c QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment
- variable to a non-empty value.
+ Because of that, \QWE accessibility support can be disabled on Linux, by setting the
+ \c QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment variable to 0.
\section1 Popups in Fullscreen Applications on Windows
Because of a limitation in the Windows compositor, applications that show a fullscreen web