An open source design system that's fully customizable and agent ready
TypeScript
fix(SideNavHeading, TopNavHeading): include headings in menu button names (#9329)
zakelstormd51f57efa6f3
diff --git a/.changeset/heading-menu-accessible-name.md b/.changeset/heading-menu-accessible-name.mdnew file mode 100644index 0000000000..159ef4afcf--- /dev/null+++ b/.changeset/heading-menu-accessible-name.md@@ -0,0 +1,6 @@+---+'@astryxdesign/core': patch+---++[fix] Include the visible heading in SideNavHeading and TopNavHeading menu button names, with or without heading links. Keep the translated generic name when TopNavHeading has no heading.+@korkt-kimdiff --git a/packages/core/locales/af-ZA.json b/packages/core/locales/af-ZA.jsonindex 38c7be3dd0..59e3ab163b 100644--- a/packages/core/locales/af-ZA.json+++ b/packages/core/locales/af-ZA.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Maak kieslys oop",+ "defaultMessage": "{heading}, Maak kieslys oop","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Maak kieslys oop",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Maak kieslys oop","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ar-SA.json b/packages/core/locales/ar-SA.jsonindex 05faec1f87..4c6c55d172 100644--- a/packages/core/locales/ar-SA.json+++ b/packages/core/locales/ar-SA.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "فتح القائمة",+ "defaultMessage": "{heading}, فتح القائمة","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "فتح القائمة",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}فتح القائمة","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ca-ES.json b/packages/core/locales/ca-ES.jsonindex 1e7d69b79a..192893b73e 100644--- a/packages/core/locales/ca-ES.json+++ b/packages/core/locales/ca-ES.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Obre el menú",+ "defaultMessage": "{heading}, Obre el menú","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Obre el menú",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Obre el menú","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/cs-CZ.json b/packages/core/locales/cs-CZ.jsonindex bb455aac8f..ade0f06dcd 100644--- a/packages/core/locales/cs-CZ.json+++ b/packages/core/locales/cs-CZ.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Otevřít nabídku",+ "defaultMessage": "{heading}, Otevřít nabídku","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Otevřít nabídku",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Otevřít nabídku","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/da-DK.json b/packages/core/locales/da-DK.jsonindex 0de38a1f05..5365f6c6db 100644--- a/packages/core/locales/da-DK.json+++ b/packages/core/locales/da-DK.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Åbn menu",+ "defaultMessage": "{heading}, Åbn menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Åbn menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Åbn menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/de-DE.json b/packages/core/locales/de-DE.jsonindex c4538777f8..abc92e1534 100644--- a/packages/core/locales/de-DE.json+++ b/packages/core/locales/de-DE.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Menü öffnen",+ "defaultMessage": "{heading}, Menü öffnen","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Menü öffnen",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Menü öffnen","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/el-GR.json b/packages/core/locales/el-GR.jsonindex 210e5e0bff..c802ffb2b1 100644--- a/packages/core/locales/el-GR.json+++ b/packages/core/locales/el-GR.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Άνοιγμα μενού",+ "defaultMessage": "{heading}, Άνοιγμα μενού","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Άνοιγμα μενού",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Άνοιγμα μενού","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/en.json b/packages/core/locales/en.jsonindex 49cf7dbbb3..a7b79c6e7c 100644--- a/packages/core/locales/en.json+++ b/packages/core/locales/en.json@@ -788,8 +788,8 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Open menu",- "description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."+ "defaultMessage": "{heading}, Open menu",+ "description": "Accessible name of the chevron menu button in SideNavHeading. `{heading}` is the visible product or workspace name and must be included unchanged."},"@astryx.slider.minimumThumb": {"defaultMessage": "Minimum value",@@ -884,8 +884,8 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Open menu",- "description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Open menu",+ "description": "Accessible name of the chevron menu button in TopNavHeading. When `hasHeading` is `true`, include the visible product or workspace name `{heading}` unchanged; otherwise use the generic menu action without a separator."},"@astryx.topNav.landmarkLabel": {"defaultMessage": "Top navigation",diff --git a/packages/core/locales/es-ES.json b/packages/core/locales/es-ES.jsonindex 2b7b702621..5704738325 100644--- a/packages/core/locales/es-ES.json+++ b/packages/core/locales/es-ES.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Abrir el menú",+ "defaultMessage": "{heading}, Abrir el menú","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Abrir el menú",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Abrir el menú","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/fi-FI.json b/packages/core/locales/fi-FI.jsonindex 9a01748727..fb01c8c0ea 100644--- a/packages/core/locales/fi-FI.json+++ b/packages/core/locales/fi-FI.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Avaa valikko",+ "defaultMessage": "{heading}, Avaa valikko","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Avaa valikko",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Avaa valikko","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/fr-FR.json b/packages/core/locales/fr-FR.jsonindex 187d9ef375..587d8f5a77 100644--- a/packages/core/locales/fr-FR.json+++ b/packages/core/locales/fr-FR.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Ouvrir le menu",+ "defaultMessage": "{heading}, Ouvrir le menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Ouvrir le menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Ouvrir le menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/he-IL.json b/packages/core/locales/he-IL.jsonindex bf485501c5..a746468223 100644--- a/packages/core/locales/he-IL.json+++ b/packages/core/locales/he-IL.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "פתח את התפריט",+ "defaultMessage": "{heading}, פתח את התפריט","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "פתח את התפריט",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}פתח את התפריט","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/hu-HU.json b/packages/core/locales/hu-HU.jsonindex 2aea11e745..c438bd01d3 100644--- a/packages/core/locales/hu-HU.json+++ b/packages/core/locales/hu-HU.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Menü megnyitása",+ "defaultMessage": "{heading}, Menü megnyitása","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Menü megnyitása",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Menü megnyitása","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/it-IT.json b/packages/core/locales/it-IT.jsonindex 65b66e055d..50fa7e76f7 100644--- a/packages/core/locales/it-IT.json+++ b/packages/core/locales/it-IT.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Apri il menu",+ "defaultMessage": "{heading}, Apri il menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Apri il menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Apri il menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ja-JP.json b/packages/core/locales/ja-JP.jsonindex 77c2cc1cff..28658be84f 100644--- a/packages/core/locales/ja-JP.json+++ b/packages/core/locales/ja-JP.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "メニューを開く",+ "defaultMessage": "{heading}, メニューを開く","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "メニューを開く",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}メニューを開く","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ko-KR.json b/packages/core/locales/ko-KR.jsonindex 8790499286..d890fb125e 100644--- a/packages/core/locales/ko-KR.json+++ b/packages/core/locales/ko-KR.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "메뉴 열기",+ "defaultMessage": "{heading}, 메뉴 열기","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "메뉴 열기",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}메뉴 열기","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/nl-NL.json b/packages/core/locales/nl-NL.jsonindex cdd0ce6937..ade828ed37 100644--- a/packages/core/locales/nl-NL.json+++ b/packages/core/locales/nl-NL.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Menu openen",+ "defaultMessage": "{heading}, Menu openen","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Menu openen",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Menu openen","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/no-NO.json b/packages/core/locales/no-NO.jsonindex 8dda7a96b5..93e5572697 100644--- a/packages/core/locales/no-NO.json+++ b/packages/core/locales/no-NO.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Åpne meny",+ "defaultMessage": "{heading}, Åpne meny","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Åpne meny",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Åpne meny","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/pl-PL.json b/packages/core/locales/pl-PL.jsonindex cc7e50a8d9..51164509d6 100644--- a/packages/core/locales/pl-PL.json+++ b/packages/core/locales/pl-PL.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Otwórz menu",+ "defaultMessage": "{heading}, Otwórz menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Otwórz menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Otwórz menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/pt-BR.json b/packages/core/locales/pt-BR.jsonindex 029eb1cbd9..ff105f0348 100644--- a/packages/core/locales/pt-BR.json+++ b/packages/core/locales/pt-BR.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Abrir menu",+ "defaultMessage": "{heading}, Abrir menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Abrir menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Abrir menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/pt-PT.json b/packages/core/locales/pt-PT.jsonindex bd273b24ed..19d0fb6d37 100644--- a/packages/core/locales/pt-PT.json+++ b/packages/core/locales/pt-PT.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Abrir menu",+ "defaultMessage": "{heading}, Abrir menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Abrir menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Abrir menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ro-RO.json b/packages/core/locales/ro-RO.jsonindex f8cf8dd29e..ff1d42c390 100644--- a/packages/core/locales/ro-RO.json+++ b/packages/core/locales/ro-RO.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Deschide meniul",+ "defaultMessage": "{heading}, Deschide meniul","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Deschide meniul",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Deschide meniul","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/ru-RU.json b/packages/core/locales/ru-RU.jsonindex d075db4b4d..6b4067f164 100644--- a/packages/core/locales/ru-RU.json+++ b/packages/core/locales/ru-RU.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Открыть меню",+ "defaultMessage": "{heading}, Открыть меню","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Открыть меню",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Открыть меню","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/sr-SP.json b/packages/core/locales/sr-SP.jsonindex c21b69f52f..fcb67d5ca7 100644--- a/packages/core/locales/sr-SP.json+++ b/packages/core/locales/sr-SP.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Отвори мени",+ "defaultMessage": "{heading}, Отвори мени","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Отвори мени",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Отвори мени","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/sv-SE.json b/packages/core/locales/sv-SE.jsonindex bf2115116d..4780858265 100644--- a/packages/core/locales/sv-SE.json+++ b/packages/core/locales/sv-SE.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Öppna meny",+ "defaultMessage": "{heading}, Öppna meny","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Öppna meny",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Öppna meny","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/tr-TR.json b/packages/core/locales/tr-TR.jsonindex 4d42d1d827..2b35938307 100644--- a/packages/core/locales/tr-TR.json+++ b/packages/core/locales/tr-TR.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Menüyü aç",+ "defaultMessage": "{heading}, Menüyü aç","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Menüyü aç",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Menüyü aç","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/uk-UA.json b/packages/core/locales/uk-UA.jsonindex 9d99ff8913..2a2d336a05 100644--- a/packages/core/locales/uk-UA.json+++ b/packages/core/locales/uk-UA.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Відкрити меню",+ "defaultMessage": "{heading}, Відкрити меню","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Відкрити меню",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Відкрити меню","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/vi-VN.json b/packages/core/locales/vi-VN.jsonindex e6f6513808..6d9a29bb21 100644--- a/packages/core/locales/vi-VN.json+++ b/packages/core/locales/vi-VN.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "Mở menu",+ "defaultMessage": "{heading}, Mở menu","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "Mở menu",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}Mở menu","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/zh-CN.json b/packages/core/locales/zh-CN.jsonindex cc09e7a146..762b8775b6 100644--- a/packages/core/locales/zh-CN.json+++ b/packages/core/locales/zh-CN.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "打开菜单",+ "defaultMessage": "{heading}, 打开菜单","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "打开菜单",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}打开菜单","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/locales/zh-TW.json b/packages/core/locales/zh-TW.jsonindex 3fee97b811..3753598e50 100644--- a/packages/core/locales/zh-TW.json+++ b/packages/core/locales/zh-TW.json@@ -580,7 +580,7 @@"description": "Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu": {- "defaultMessage": "開啟功能表",+ "defaultMessage": "{heading}, 開啟功能表","description": "Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label": {@@ -648,7 +648,7 @@"description": "Label on the \"×\" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner \"all\"; short."},"@astryx.topNav.heading.openMenu": {- "defaultMessage": "開啟功能表",+ "defaultMessage": "{hasHeading, select, true {{heading}, } other {}}開啟功能表","description": "Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel": {diff --git a/packages/core/src/SideNav/SideNav.test.tsx b/packages/core/src/SideNav/SideNav.test.tsxindex e0b2bd6306..d298554c70 100644--- a/packages/core/src/SideNav/SideNav.test.tsx+++ b/packages/core/src/SideNav/SideNav.test.tsx@@ -36,6 +36,7 @@ import {SideNavSection} from './SideNavSection';import {LinkProvider} from '../Link/LinkProvider';import {InternationalizationProvider} from '../i18n/InternationalizationProvider';import pseudoCatalog from '../../locales/pseudo.json';+import koreanCatalog from '../../locales/ko-KR.json';import {SideNavCollapseContext,type SideNavImperativeCollapseHandle,@@ -358,6 +359,22 @@ describe('SideNavHeading', () => {}});+ it('includes the visible heading in the menu trigger name without hrefs', () => {+ render(<SideNavHeading heading="Acme" menu={<div>Menu content</div>} />);+ expect(screen.getByRole('button')).toHaveAccessibleName('Acme, Open menu');+ });++ it('includes the heading in the translated menu trigger name', () => {+ render(+ <InternationalizationProvider+ locale="ko-KR"+ messages={{'ko-KR': koreanCatalog}}>+ <SideNavHeading heading="Acme" menu={<div>Menu content</div>} />+ </InternationalizationProvider>,+ );+ expect(screen.getByRole('button')).toHaveAccessibleName('Acme, 메뉴 열기');+ });+it('shows chevron when menu is provided', () => {render(<SideNavHeading heading="My App" menu={<div>Menu content</div>} />);// The chevron SVG should be rendered@@ -402,7 +419,7 @@ describe('SideNavHeading', () => {menu={<div>Menu</div>}/>,);- const button = screen.getByRole('button', {name: 'Open menu'});+ const button = screen.getByRole('button', {name: 'Product, Open menu'});expect(button).toHaveAttribute('aria-haspopup', 'true');});@@ -448,7 +465,7 @@ describe('SideNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));for (const pointer of [{pointerType: 'mouse', pointerId: 1, button: 0},{pointerType: 'touch', pointerId: 2},@@ -486,7 +503,7 @@ describe('SideNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expectNativeLinkClicks(screen.getByRole('menuitem', {name: 'Docs', hidden: true}),);@@ -507,7 +524,7 @@ describe('SideNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const item = (name: string) =>screen.getByRole('menuitem', {name, hidden: true});item('One').focus();@@ -536,7 +553,7 @@ describe('SideNavHeading', () => {<button type="button">Outside</button></>,);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);expect(trigger).toHaveAttribute('aria-expanded', 'true');const mouse = {pointerType: 'mouse', pointerId: 3, button: 0};@@ -570,7 +587,7 @@ describe('SideNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const item = (name: string) =>screen.getByRole('menuitem', {name, hidden: true});for (const pointer of [@@ -590,7 +607,7 @@ describe('SideNavHeading', () => {it('does not wrap the heading menu popup in a modal dialog', async () => {const user = userEvent.setup();render(<SideNavHeading heading="My App" menu={menuItems} />);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expect(document.querySelector('[role="dialog"]')).toBeNull();expect(document.querySelector('[aria-modal="true"]')).toBeNull();});@@ -598,7 +615,7 @@ describe('SideNavHeading', () => {it('scopes role="menu" to only menuitem children with an accessible name', async () => {const user = userEvent.setup();render(<SideNavHeading heading="My App" menu={menuItems} />);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const menu = document.querySelector('[role="menu"]');expect(menu).not.toBeNull();expect(menu).toHaveAttribute('aria-label', 'My App');@@ -612,7 +629,7 @@ describe('SideNavHeading', () => {it('keeps the popup heading button outside the menu and closes on click', async () => {const user = userEvent.setup();render(<SideNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);expect(trigger).toHaveAttribute('aria-expanded', 'true');const menu = document.querySelector('[role="menu"]');@@ -638,7 +655,7 @@ describe('SideNavHeading', () => {menu={menuItems}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expect(document.querySelector('[role="dialog"]')).toBeNull();const menu = document.querySelector('[role="menu"]');expect(menu).not.toBeNull();@@ -3261,7 +3278,7 @@ describe('SideNav focus ring (A15)', () => {it('draws the shared ring on the heading menu trigger', () => {render(<SideNavHeading heading="My App" menu={<div>menu</div>} />);- expectSharedFocusRing(screen.getByRole('button', {name: 'Open menu'}));+ expectSharedFocusRing(screen.getByRole('button', {name: /Open menu/}));});});@@ -3530,7 +3547,7 @@ describe('SideNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<SideNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -3548,7 +3565,7 @@ describe('SideNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<SideNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -3568,7 +3585,7 @@ describe('SideNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<SideNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -3586,7 +3603,7 @@ describe('SideNavHeading hover/click guard', () => {it('returns focus to the trigger on Escape', async () => {const user = userEvent.setup();render(<SideNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);expect(trigger).toHaveAttribute('aria-expanded', 'true');diff --git a/packages/core/src/SideNav/SideNavHeading.tsx b/packages/core/src/SideNav/SideNavHeading.tsxindex 844d7b8d4b..76adab4a2c 100644--- a/packages/core/src/SideNav/SideNavHeading.tsx+++ b/packages/core/src/SideNav/SideNavHeading.tsx@@ -765,7 +765,7 @@ export function SideNavHeading({<buttonref={setTriggerEl}type="button"- aria-label={t('@astryx.sideNav.heading.openMenu')}+ aria-label={t('@astryx.sideNav.heading.openMenu', {heading})}onClick={e => {e.stopPropagation();triggerProps.onClick();@@ -848,7 +848,7 @@ export function SideNavHeading({<buttonref={setTriggerEl}type="button"- aria-label={t('@astryx.sideNav.heading.openMenu')}+ aria-label={t('@astryx.sideNav.heading.openMenu', {heading})}onClick={e => {e.stopPropagation();triggerProps.onClick();diff --git a/packages/core/src/TopNav/TopNav.test.tsx b/packages/core/src/TopNav/TopNav.test.tsxindex 0112630b12..80595a9687 100644--- a/packages/core/src/TopNav/TopNav.test.tsx+++ b/packages/core/src/TopNav/TopNav.test.tsx@@ -22,6 +22,8 @@ import {NavIcon} from '../NavIcon';import {TopNavItem} from './TopNavItem';import {TopNavMegaMenuFeaturedCard} from './TopNavMegaMenuFeaturedCard';import {LinkProvider} from '../Link/LinkProvider';+import {InternationalizationProvider} from '../i18n/InternationalizationProvider';+import koreanCatalog from '../../locales/ko-KR.json';function CustomLink({children,@@ -301,6 +303,51 @@ describe('TopNavHeading', () => {expect(ref).toHaveBeenCalledWith(expect.any(HTMLElement));});+ it('includes the visible heading in the menu trigger name without hrefs', () => {+ render(<TopNavHeading heading="Acme" menu={<div>Menu content</div>} />);+ expect(screen.getByRole('button')).toHaveAccessibleName('Acme, Open menu');+ });++ it('includes the heading in the translated menu trigger name with independent links', () => {+ render(+ <InternationalizationProvider+ locale="ko-KR"+ messages={{'ko-KR': koreanCatalog}}>+ <TopNavHeading+ heading="Acme"+ headingHref="/acme"+ menu={<div>Menu content</div>}+ />+ </InternationalizationProvider>,+ );+ expect(screen.getByRole('button')).toHaveAccessibleName('Acme, 메뉴 열기');+ expect(screen.getByRole('link', {name: 'Acme'})).toHaveAttribute(+ 'href',+ '/acme',+ );+ });++ it('keeps the translated generic menu trigger name when the optional heading is absent or empty', () => {+ const menu = <div>Menu content</div>;+ const {rerender} = render(+ <InternationalizationProvider+ locale="ko-KR"+ messages={{'ko-KR': koreanCatalog}}>+ <TopNavHeading menu={menu} />+ </InternationalizationProvider>,+ );+ expect(screen.getByRole('button')).toHaveAccessibleName('메뉴 열기');++ rerender(+ <InternationalizationProvider+ locale="ko-KR"+ messages={{'ko-KR': koreanCatalog}}>+ <TopNavHeading heading="" menu={menu} />+ </InternationalizationProvider>,+ );+ expect(screen.getByRole('button')).toHaveAccessibleName('메뉴 열기');+ });+// ===========================================================================// Menu popover semantics — the popup must not be announced as a modal// dialog, and role="menu" must be scoped to the actual menu items so the@@ -338,7 +385,7 @@ describe('TopNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const FIRST = 'Alpha';const SECOND = 'Beta';const item = (name: string) =>@@ -371,7 +418,7 @@ describe('TopNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expectNativeLinkClicks(screen.getByRole('menuitem', {name: 'Docs', hidden: true}),);@@ -392,7 +439,7 @@ describe('TopNavHeading', () => {}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const item = (name: string) =>screen.getByRole('menuitem', {name, hidden: true});item('One').focus();@@ -418,7 +465,7 @@ describe('TopNavHeading', () => {}/>,);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);const focusSpy = vi.spyOn(trigger, 'focus');const alpha = screen.getByRole('menuitem', {name: 'Alpha', hidden: true});@@ -434,7 +481,7 @@ describe('TopNavHeading', () => {it('does not wrap the heading menu popup in a modal dialog', async () => {const user = userEvent.setup();render(<TopNavHeading heading="My App" menu={menuItems} />);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expect(document.querySelector('[role="dialog"]')).toBeNull();expect(document.querySelector('[aria-modal="true"]')).toBeNull();});@@ -442,7 +489,7 @@ describe('TopNavHeading', () => {it('scopes role="menu" to only menuitem children with an accessible name', async () => {const user = userEvent.setup();render(<TopNavHeading heading="My App" menu={menuItems} />);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));const menu = document.querySelector('[role="menu"]');expect(menu).not.toBeNull();expect(menu).toHaveAttribute('aria-label', 'My App');@@ -456,7 +503,7 @@ describe('TopNavHeading', () => {it('keeps the popup heading button outside the menu and closes on click', async () => {const user = userEvent.setup();render(<TopNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);expect(trigger).toHaveAttribute('aria-expanded', 'true');const menu = document.querySelector('[role="menu"]');@@ -482,7 +529,7 @@ describe('TopNavHeading', () => {menu={menuItems}/>,);- await user.click(screen.getByRole('button', {name: 'Open menu'}));+ await user.click(screen.getByRole('button', {name: /Open menu/}));expect(document.querySelector('[role="dialog"]')).toBeNull();const menu = document.querySelector('[role="menu"]');expect(menu).not.toBeNull();@@ -795,7 +842,7 @@ describe('TopNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<TopNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -813,7 +860,7 @@ describe('TopNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<TopNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -833,7 +880,7 @@ describe('TopNavHeading hover/click guard', () => {vi.useFakeTimers({shouldAdvanceTime: true});const user = userEvent.setup({advanceTimers: vi.advanceTimersByTime});render(<TopNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.hover(trigger);act(() => {@@ -851,7 +898,7 @@ describe('TopNavHeading hover/click guard', () => {it('returns focus to the trigger on Escape', async () => {const user = userEvent.setup();render(<TopNavHeading heading="My App" menu={menuItems} />);- const trigger = screen.getByRole('button', {name: 'Open menu'});+ const trigger = screen.getByRole('button', {name: /Open menu/});await user.click(trigger);expect(trigger).toHaveAttribute('aria-expanded', 'true');diff --git a/packages/core/src/TopNav/TopNavHeading.tsx b/packages/core/src/TopNav/TopNavHeading.tsxindex e8808431f3..ea5fb76c2e 100644--- a/packages/core/src/TopNav/TopNavHeading.tsx+++ b/packages/core/src/TopNav/TopNavHeading.tsx@@ -549,7 +549,10 @@ export function TopNavHeading({<buttonref={setTriggerEl}type="button"- aria-label={t('@astryx.topNav.heading.openMenu')}+ aria-label={t('@astryx.topNav.heading.openMenu', {+ heading: heading ?? '',+ hasHeading: heading ? 'true' : 'false',+ })}onClick={e => {e.stopPropagation();triggerProps.onClick();@@ -631,7 +634,10 @@ export function TopNavHeading({<buttonref={setTriggerEl}type="button"- aria-label={t('@astryx.topNav.heading.openMenu')}+ aria-label={t('@astryx.topNav.heading.openMenu', {+ heading: heading ?? '',+ hasHeading: heading ? 'true' : 'false',+ })}onClick={e => {e.stopPropagation();triggerProps.onClick();