diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 594c63bbab6..f28070a7bf7 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -4146,7 +4146,7 @@ impl Element { // https://html.spec.whatwg.org/multipage/#language pub fn get_lang(&self) -> String { self.upcast::() - .inclusive_ancestors(ShadowIncluding::No) + .inclusive_ancestors(ShadowIncluding::Yes) .filter_map(|node| { node.downcast::().and_then(|el| { el.get_attribute(&ns!(xml), &local_name!("lang")) diff --git a/tests/wpt/meta/html/dom/elements/global-attributes/lang-attribute-shadow.window.js.ini b/tests/wpt/meta/html/dom/elements/global-attributes/lang-attribute-shadow.window.js.ini deleted file mode 100644 index 69d3423ce87..00000000000 --- a/tests/wpt/meta/html/dom/elements/global-attributes/lang-attribute-shadow.window.js.ini +++ /dev/null @@ -1,9 +0,0 @@ -[lang-attribute-shadow.window.html] - [lang on slot inherits from shadow host] - expected: FAIL - - [lang only on host] - expected: FAIL - - [lang on host and slotted element] - expected: FAIL