@@ -1,5 +1,10 @@
-return !!(
-	node.getAttribute('lang') ||
-	node.getAttribute('xml:lang') ||
-	''
-).trim();
+const { isXHTML } = axe.utils;
+
+const langValue = (node.getAttribute(`lang`) || '').trim();
+const xmlLangValue = (node.getAttribute(`xml:lang`) || '').trim();
+
+if (!langValue && !isXHTML(document)) {
+	return false;
+}
+
+return !!(langValue || xmlLangValue);
return !!(
	node.getAttribute('lang') ||
	node.getAttribute('xml:lang') ||
	''
).trim();

Just curious: why use backticks (\`) here rather than quotes?