Add runtime flag for exposing "display: none" nodes for accessibility
This is CL [2/4] in a series of CLs to expose "display: none"
elements to the browser process AXTree.
1. Add and improve tests for CSS display and visibility.
2. Introduce new command line flag and chrome://flags entry.
3. Update AXObject::ComputeAccessibilityIsIgnoredButIncludedInTree
and relevant logic for the feature to work, disabled using the
feature flag.
4. Enable the feature in tests; update expectation files.
---
In this change I added a new RuntimeEnabledFeature flag and an
associated chrome://flags switch entry to enable the feature.
This CL does not use the flag, but prepares for use in CL [3/4].
Bug: 651614
Change-Id: I5cd4b517820a593994318d30a3ace8692e40a754
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809610
Commit-Queue: Adam Ettenberger <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: Dominic Mazzoni <[email protected]>
Reviewed-by: Kurt Catti-Schmidt <[email protected]>
Cr-Commit-Position: refs/heads/master@{#698994}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 1901374..a21ee22 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -148,6 +148,7 @@
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/forcedark/forcedark_switches.h"
#include "third_party/leveldatabase/leveldb_features.h"
+#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/accessibility_switches.h"
#include "ui/base/ui_base_features.h"
#include "ui/base/ui_base_switches.h"
@@ -3468,6 +3469,11 @@
kOsDesktop,
FEATURE_VALUE_TYPE(features::kExperimentalAccessibilityLabels)},
+ {"enable-accessibility-expose-display-none",
+ flag_descriptions::kAccessibilityExposeDisplayNoneName,
+ flag_descriptions::kAccessibilityExposeDisplayNoneDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kEnableAccessibilityExposeDisplayNone)},
+
{"enable-accessibility-object-model",
flag_descriptions::kEnableAccessibilityObjectModelName,
flag_descriptions::kEnableAccessibilityObjectModelDescription, kOsAll,