diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc index f93a4a6c1e97a4..87df1e43869d89 100644 --- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc +++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc @@ -52,7 +52,8 @@ bool AccessibilityTreeContainsAllChildTrees(const ui::AXNode& node) { if (!num_children) { // No children. All content is contained unless there is supposed to be // a child tree for this node. - return !ui::IsChildTreeOwner(node.GetRole()); + return !ui::IsChildTreeOwner(node.GetRole()) || + node.data().GetRestriction() == ax::mojom::Restriction::kDisabled; } for (size_t i = 0; i < num_children; i++) { diff --git a/content/test/data/accessibility/html/embed-expected-android-external.txt b/content/test/data/accessibility/html/embed-expected-android-external.txt index 9d80d0188663ec..e0ec3cb87a8716 100644 --- a/content/test/data/accessibility/html/embed-expected-android-external.txt +++ b/content/test/data/accessibility/html/embed-expected-android-external.txt @@ -1,3 +1,3 @@ WebView focusable focused scrollable actions:[CLEAR_FOCUS, AX_FOCUS] bundle:[chromeRole="rootWebArea"] ++View actions:[AX_FOCUS] bundle:[chromeRole="genericContainer"] -++++View actions:[AX_FOCUS] bundle:[chromeRole="embeddedObject", roleDescription="object"] \ No newline at end of file +++++View disabled actions:[AX_FOCUS] bundle:[chromeRole="embeddedObject", roleDescription="object"] \ No newline at end of file diff --git a/content/test/data/accessibility/html/embed-expected-android.txt b/content/test/data/accessibility/html/embed-expected-android.txt index 2771ff0b91307c..b19408545b7b64 100644 --- a/content/test/data/accessibility/html/embed-expected-android.txt +++ b/content/test/data/accessibility/html/embed-expected-android.txt @@ -1,3 +1,3 @@ android.webkit.WebView focusable focused scrollable ++android.view.View -++++android.view.View role_description='object' +++++android.view.View role_description='object' disabled \ No newline at end of file diff --git a/content/test/data/accessibility/html/embed-expected-blink.txt b/content/test/data/accessibility/html/embed-expected-blink.txt index f477743023530f..1ea2acaad2d558 100644 --- a/content/test/data/accessibility/html/embed-expected-blink.txt +++ b/content/test/data/accessibility/html/embed-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++genericContainer ignored ++++genericContainer -++++++embeddedObject \ No newline at end of file +++++++embeddedObject restriction=disabled diff --git a/content/test/data/accessibility/html/embed-expected-uia-win.txt b/content/test/data/accessibility/html/embed-expected-uia-win.txt index 9fcd0cd52b28f9..e7415109c5ed4f 100644 --- a/content/test/data/accessibility/html/embed-expected-uia-win.txt +++ b/content/test/data/accessibility/html/embed-expected-uia-win.txt @@ -1,3 +1,3 @@ Document ++Group IsControlElement=false -++++Pane IsControlElement=false +++++Pane IsEnabled=false IsControlElement=false \ No newline at end of file diff --git a/content/test/data/accessibility/html/fencedframe-scrollable-shadowdom-expected-blink.txt b/content/test/data/accessibility/html/fencedframe-scrollable-shadowdom-expected-blink.txt index 212b818d2fa987..22b09963d6972d 100644 --- a/content/test/data/accessibility/html/fencedframe-scrollable-shadowdom-expected-blink.txt +++ b/content/test/data/accessibility/html/fencedframe-scrollable-shadowdom-expected-blink.txt @@ -1,7 +1,7 @@ rootWebArea scrollable=true ++genericContainer ignored ++++genericContainer -++++++iframe name='Scrollable iframe' +++++++group name='Scrollable iframe' ++++++++iframe ++++++++++rootWebArea scrollable=true ++++++++++++genericContainer ignored diff --git a/content/test/data/accessibility/html/object-expected-android-external.txt b/content/test/data/accessibility/html/object-expected-android-external.txt index e1ecb4e9f34b71..d30be048599ccc 100644 --- a/content/test/data/accessibility/html/object-expected-android-external.txt +++ b/content/test/data/accessibility/html/object-expected-android-external.txt @@ -1,3 +1,3 @@ WebView focusable focused scrollable actions:[CLEAR_FOCUS, AX_FOCUS] bundle:[chromeRole="rootWebArea"] ++View actions:[AX_FOCUS] bundle:[chromeRole="genericContainer"] -++++View actions:[AX_FOCUS] bundle:[chromeRole="pluginObject", roleDescription="object"] \ No newline at end of file +++++View disabled actions:[AX_FOCUS] bundle:[chromeRole="pluginObject", roleDescription="object"] \ No newline at end of file diff --git a/content/test/data/accessibility/html/object-expected-android.txt b/content/test/data/accessibility/html/object-expected-android.txt index 2771ff0b91307c..b19408545b7b64 100644 --- a/content/test/data/accessibility/html/object-expected-android.txt +++ b/content/test/data/accessibility/html/object-expected-android.txt @@ -1,3 +1,3 @@ android.webkit.WebView focusable focused scrollable ++android.view.View -++++android.view.View role_description='object' +++++android.view.View role_description='object' disabled \ No newline at end of file diff --git a/content/test/data/accessibility/html/object-expected-blink.txt b/content/test/data/accessibility/html/object-expected-blink.txt index a50015957132ba..600cb12eafd002 100644 --- a/content/test/data/accessibility/html/object-expected-blink.txt +++ b/content/test/data/accessibility/html/object-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++genericContainer ignored ++++genericContainer -++++++pluginObject +++++++pluginObject restriction=disabled diff --git a/content/test/data/accessibility/html/object-expected-uia-win.txt b/content/test/data/accessibility/html/object-expected-uia-win.txt index 3c480e6517f969..4f9152a21fad1f 100644 --- a/content/test/data/accessibility/html/object-expected-uia-win.txt +++ b/content/test/data/accessibility/html/object-expected-uia-win.txt @@ -1,3 +1,3 @@ Document ++Group IsControlElement=false -++++Document IsControlElement=false +++++Document IsEnabled=false IsControlElement=false \ No newline at end of file diff --git a/content/test/data/accessibility/html/object-image-expected-blink.txt b/content/test/data/accessibility/html/object-image-expected-blink.txt index 868d4e41bafc7f..ccd8a469c7141f 100644 --- a/content/test/data/accessibility/html/object-image-expected-blink.txt +++ b/content/test/data/accessibility/html/object-image-expected-blink.txt @@ -2,7 +2,7 @@ rootWebArea ++genericContainer ignored ++++genericContainer ignored ++++++genericContainer -++++++++pluginObject +++++++++pluginObject restriction=disabled ++++++genericContainer ++++++++staticText name='complete' ++++++++++inlineTextBox name='complete' \ No newline at end of file diff --git a/content/test/data/accessibility/html/param-expected-android-external.txt b/content/test/data/accessibility/html/param-expected-android-external.txt index e1ecb4e9f34b71..d30be048599ccc 100644 --- a/content/test/data/accessibility/html/param-expected-android-external.txt +++ b/content/test/data/accessibility/html/param-expected-android-external.txt @@ -1,3 +1,3 @@ WebView focusable focused scrollable actions:[CLEAR_FOCUS, AX_FOCUS] bundle:[chromeRole="rootWebArea"] ++View actions:[AX_FOCUS] bundle:[chromeRole="genericContainer"] -++++View actions:[AX_FOCUS] bundle:[chromeRole="pluginObject", roleDescription="object"] \ No newline at end of file +++++View disabled actions:[AX_FOCUS] bundle:[chromeRole="pluginObject", roleDescription="object"] \ No newline at end of file diff --git a/content/test/data/accessibility/html/param-expected-blink.txt b/content/test/data/accessibility/html/param-expected-blink.txt index a50015957132ba..4fd4408f39ecdf 100644 --- a/content/test/data/accessibility/html/param-expected-blink.txt +++ b/content/test/data/accessibility/html/param-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++genericContainer ignored ++++genericContainer -++++++pluginObject +++++++pluginObject restriction=disabled \ No newline at end of file diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index bd8148444cd00e..b079dd83c6dec1 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc @@ -1258,6 +1258,13 @@ ax::mojom::blink::Role AXNodeObject::NativeRoleIgnoringAria() const { if (IsFrame(GetNode())) return ax::mojom::blink::Role::kIframe; + if (IsA(GetNode())) { + // Shadow DOM s are marked as a group, as they are not the + // child tree owner. The child tree owner is their