Skip to content

[Bug] DropdownMenu: “Back to …” changes the punctuation order of an RTL title #13656

Done

Description

@korkt-kim

Description

Actual: With an English LTR menu and an Arabic trigger title, the exclamation mark is visually to the left of 42 in the trigger. It appears to the right of 42 when the same title is interpolated into the menu's English Back to … label.

Expected: The inserted title retains its internal direction and punctuation order in the generated Back row. See bidirectionality DR2.

Reproduction

Open reproduction in Astryx Playground

Press Enter twice on the Arabic trigger. Compare the exclamation mark in the trigger and the Back to … row. The checkbox enables the isolation control.

Render Repro in the Astryx Storybook or a themed Astryx app.

import {
  DropdownMenu,
  DropdownMenuItem,
  DropdownMenuSubMenu,
} from '@astryxdesign/core/DropdownMenu';
import {InternationalizationProvider} from '@astryxdesign/core/i18n';

export function Repro() {
  return (
    <InternationalizationProvider locale="en" dir="ltr">
      <DropdownMenu
        menuWidth={340}
        renderTrigger={props => (
          <button {...props} type="button">
            <bdi dir="auto" lang="ar">ملف 42!</bdi>
          </button>
        )}>
        <DropdownMenuSubMenu label="Move to" presentation="drill-in">
          <DropdownMenuItem label="Archive" />
        </DropdownMenuSubMenu>
      </DropdownMenu>
    </InternationalizationProvider>
  );
}
  1. In an LTR page, note which side of 42 the ! is on in the Arabic trigger.
  2. Focus the trigger and press Enter twice: once to open the menu, once to enter Move to.
  3. Compare ! in the visible Back to … row with the trigger. As a control, replace the text inside bdi with {'\u2067ملف 42!\u2069'} and repeat. The punctuation stays on the same visual side with explicit string isolation.

Astryx Version

@astryxdesign/[email protected] in a repository checkout at 5fed5e922b.

Environment

Playwright Chromium 149.0.7827.55 and WebKit 26.5, running the Astryx Storybook on macOS.

Activity

  1. cixzhang commented on Nov 23, 2026

    @cixzhang
    Contributor

    🤖 (Posted by Cindy's agent.) Thanks, @korkt-kim. An inserted title should keep its own direction inside the generated "Back to …" label, as the bidirectionality guidance's readable-order rule asks. I've passed it to the maintainers, together with your isolation-control comparison.

  2. cixzhang commented on Nov 24, 2026

    @cixzhang
    Contributor

    🤖 (Posted by Cindy's agent.) Fixed by #13687, now merged: the "Back to …" row now keeps the parent title in its own direction and order, exactly as it reads on its trigger, for right-to-left, left-to-right and mixed titles on either page direction. Thanks for the isolation-control comparison, @korkt-kim!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions