Skip to content

Connect locale state to semantic bidi boundaries - #24

Merged
smiggleworth merged 1 commit into
mainfrom
codex/semantic-bidi-milestones
Aug 24, 2026
Merged

Connect locale state to semantic bidi boundaries#24
smiggleworth merged 1 commit into
mainfrom
codex/semantic-bidi-milestones

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Summary

Milestone 1 — direction contract

  • resolve locale direction with Intl.Locale#getTextInfo(), a likely-script compatibility fallback, and explicit application overrides
  • default locale scopes such as Arabic to RTL while retaining runtime validation
  • expose frozen, typed semantic { lang, dir } attributes

Milestone 2 — explicit DOM integration

  • expose localeAttributes() for SSR templates and client locale selection
  • expose applyLocaleAttributes() for an explicit DOM target without hidden global mutation
  • expose i18n.attributes() for real nested language/direction boundaries

Milestone 3 — production-faithful verification and guidance

  • run Chromium contract tests for atomic document switches, nested opposing boundaries, bdi, dir="auto" inputs, logical spacing, and overlay anchoring
  • document SSR-before-hydration application, nested scopes, unknown-direction content, and logical CSS
  • keep the browser contract in the default npm test / npm run check gate

Verification

  • npm run check
  • npm run fmt -- --check
  • git diff --check
  • 23 unit/package tests and 5 Chromium browser tests

Closes #23

No package version was changed and no package was published.

@smiggleworth
smiggleworth force-pushed the codex/semantic-bidi-milestones branch from 5576f98 to 6a0941f Compare August 24, 2026 13:44
@smiggleworth
smiggleworth marked this pull request as ready for review August 24, 2026 13:46
Copilot AI lite review requested due to automatic review settings August 24, 2026 13:46
@smiggleworth
smiggleworth merged commit 0ad744a into main Aug 24, 2026
3 checks passed
@smiggleworth
smiggleworth deleted the codex/semantic-bidi-milestones branch August 24, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect locale direction state to semantic DOM bidi boundaries

2 participants