Skip to content

Revert browser-translation DOM workarounds and document application-level opt-outs #2064

Closed

Description

@domgan-oai

Revert Octane's translation-specific DOM accommodation and make disabling external translation of framework-owned content the supported mitigation.

We addressed browser translation by accepting and repairing its DOM mutations inside Octane. We should reverse that decision: applications should prevent those tools from transforming content that Octane owns, particularly when the application already provides localization.

Why

The original reproduction in #1904 shows native translation replacing Text nodes with nested <font> elements before adoption. Subsequent changes accommodate displaced nodes, relocated whitespace, and additional text-run shapes. Supporting each observed rewrite expands the adoption and update contract without establishing a reliable contract with the external mutator.

Scope

Preserve unrelated improvements bundled into these PRs, including efficient sibling traversal, strict topology validation, stable member reads, generic error-note infrastructure, and journaling/view-transition guarantees.

Likely areas: dom-bindings.ts, dom-binding-program.ts, runtime/compiler only-child text paths, their tests, and docs/deferred-hydration.md.

Supported mitigation and acceptance

  • Document application-owned opt-outs in the initial server-rendered HTML: <meta name="google" content="notranslate"> for Google page translation, and translate="no" on the document or relevant owned roots. See Chromium's translation design and the HTML translate attribute.
  • State the boundary clearly: arbitrary external rewriting of framework-owned DOM is unsupported; these opt-outs apply to tools that honor them. Keep localization under application control.
  • Update documentation, error guidance, and translation-specific tests to match that contract. Preserve normal SSR/adoption, scalar/structural updates, disposal/handoff, and invalid-topology coverage.
  • Before affected consumers take the revert, verify their opt-outs with native browser translation before adoption and after activation, including hidden/deferred content.
  • Report compiler/runtime compatibility checks and bundle/performance deltas for the final removal.

Activity

  1. added
    enhancement
    agent-authored
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-authoredenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions