summaryrefslogtreecommitdiff
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-17 19:59:37 +0200
commit8f06b3e970f768f6a5776845c83090f1fc8b0162 (patch)
treeeed6b035cd46721bed4b36d88685028b6803c5c8
parentd1347ebbe99b467799680bb6e3cee81932751df5 (diff)
downloadqtwebengine-8f06b3e970f768f6a5776845c83090f1fc8b0162.tar.gz
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 Pick-to: 6.5 5.15 Change-Id: Ie5554f8b578dcca87a54dad525ae6a83d6f8f9d8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/accessibility_activation_observer.cpp9
-rw-r--r--src/core/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 179a780d0..4f25a35ff 100644
--- a/src/core/accessibility_activation_observer.cpp
+++ b/src/core/accessibility_activation_observer.cpp
@@ -10,12 +10,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/core/doc/src/qtwebengine-platform-notes.qdoc b/src/core/doc/src/qtwebengine-platform-notes.qdoc
index 76f5bbfda..22fa5bfee 100644
--- a/src/core/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/core/doc/src/qtwebengine-platform-notes.qdoc
@@ -193,13 +193,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, \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