Skip to content

docs: clarify language and direction inheritance in shadow DOM - #45537

Merged
Josh-Cena merged 2 commits into
mdn:mainfrom
Kin230k:docs/45249-shadow-dom-language-direction
Sep 8, 2026
Merged

Josh-Cena merged 2 commits into
mdn:mainfrom
Kin230k:docs/45249-shadow-dom-language-direction

Conversation

@Kin230k

@Kin230k Kin230k commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Clarify the existing Attribute inheritance section in the Using shadow DOM guide. Explain parent-based inheritance across a shadow boundary and distinguish a slot's inheritance from that of its assigned light-DOM content.

Motivation

The current sentence implies that every slot inherits language and directionality directly from the shadow host, overlooking intervening shadow-tree ancestors. The replacement adds a short nested-slot example and retains qualifications and reference links for directionality exceptions, following the invitation to propose a focused update.

Additional details

The wording follows the HTML Standard's language rules and parent directionality algorithm, together with the DOM Standard's slot assignment rules.

Validation:

  • Changed-file Markdown, Prettier, front-matter, spelling and cross-reference checks passed.
  • npm test: 12 passed, 0 failed.
  • Changed-page Rari build and Fred SSR passed with no reported page issues.
  • Local rendered page checked at 1440px and 390px: both paragraphs and links rendered correctly, without horizontal overflow.
  • A Chromium experiment checked :lang(), :dir(), DOM parents and explicit attributes separately for nested slots, fallback content, assigned spans, explicit overrides, and directionality exceptions (bdi and telephone inputs).

This is a one-file prose correction: no runtime, dependency or anchor changes. No cross-browser or assistive-technology testing is claimed.

AI assistance: Codex assisted with research, wording, validation and a separate exact-commit review.

Related issues and pull requests

Fixes #45249

@Kin230k
Kin230k requested a review from a team as a code owner September 6, 2026 14:09
@Kin230k
Kin230k requested review from sideshowbarker and removed request for a team September 6, 2026 14:09
@github-actions github-actions Bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Sep 6, 2026
@Josh-Cena
Josh-Cena requested review from Josh-Cena and removed request for sideshowbarker September 6, 2026 14:45
@Josh-Cena
Josh-Cena requested a review from a team as a code owner September 8, 2026 07:33
@Josh-Cena
Josh-Cena requested review from wbamberg and removed request for a team September 8, 2026 07:33

@Josh-Cena Josh-Cena left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, great additions

@github-actions github-actions Bot added Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Sep 8, 2026
@Josh-Cena
Josh-Cena merged commit 8ed4657 into mdn:main Sep 8, 2026
8 checks passed
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document inheritance of HTML directionality and language and its relationship to shadow DOM

3 participants