Text inheriting its programmatic language from an element
The text inheriting its programmatic language from an element E is composed of all the following texts:
- the value of any text nodes that are either visible or included in the accessibility tree, and children of an element inheriting its programmatic language from E;
- the accessible name and accessible description of any element inheriting its programmatic language from E, and included in the accessibility tree;
- the value of the document title, only if E is a document in a top-level browsing context.
Element inheriting its programmatic language from an element
An element F is an element inheriting its programmatic language from an element E if at least one of the following conditions is true (recursively):
- F is E itself (an element always inherits its programmatic language from itself); or
- F does not have a non-empty
lang
attribute, and is the child in the flat tree of an element inheriting its programmatic language from E; or - F is a fully active document element, has no non-empty
lang
attribute, and its browsing context container is an element inheriting its programmatic language from E.