summaryrefslogtreecommitdiffstats
path: root/src/core
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 /src/core
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)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/accessibility_activation_observer.cpp9
1 files changed, 5 insertions, 4 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