8000 Name the masthead options toggle shown on narrow screens by atishay-kasliwal · Pull Request #54780 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Name the masthead options toggle shown on narrow screens - #54780

Merged
edewit merged 1 commit into
keycloak:mainfrom
atishay-kasliwal:fix/54360-masthead-kebab-accessible-name
Nov 9, 2026
Merged

edewit merged 1 commit into
keycloak:mainfrom
atishay-kasliwal:fix/54360-masthead-kebab-accessible-name

Conversation

@atishay-kasliwal
Copy link
Copy Markdown
Contributor

Closes #54360.

The issue suggested t("options"), but that key doesn't exist in either console's messages, so options=Options was added to both the account and admin bundles. Without it, a screen reader would announce the raw key, and translators couldn't pick it up.

KeycloakDropdown gets an optional toggleLabel prop rather than a fixed label, because only the kebab variant has no visible text. The desktop dropdown keeps showing the user's name as its accessible name.

The tests in mobile-nav.spec.ts and masthead/main.spec.ts fail without this change and pass with it. Run in Chromium against a nightly server with these message files patched into the account and admin themes. ESLint, TypeScript and the ui-shared unit tests pass.

The navigation toggle has the same gap: t("navigation") has no message key in either bundle. Left out to keep this change focused; can send separately.

Assisted-by: Claude Opus 5.5

Closes keycloak#54360

Signed-off-by: Atishay Kasliwal <katishay@gmail.com>
@atishay-kasliwal
atishay-kasliwal marked this pull request as ready for review November 6, 2026 16:54
@atishay-kasliwal
atishay-kasliwal requested review from a team as code owners November 6, 2026 16:54
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:54
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change add 8000 ing a localized accessible name to the mobile masthead toggle.

No open issues 🎉

What changed in this PR

Addresses #54360 by giving the shared masthead’s narrow-screen options toggle a localized accessible name in both consoles, while preserving the desktop dropdown’s username label.

Changes:

  • Adds an optional toggleLabel prop and supplies it for the kebab toggle.
  • Adds the English options message to both console bundles.
  • Adds accessible-name regression assertions for both mobile mastheads.
File Description
js/​libs/​ui-shared/​src/​masthead/​Masthead.tsx Supplies the translated options label.
js/​libs/​ui-shared/​src/​masthead/​KeycloakDropdown.tsx Passes the optional label to MenuToggle via aria-label.
js/​apps/​admin-ui/​test/​masthead/​main.spec.ts Checks the mobile toggle’s accessible name.
js/​apps/​admin-ui/​maven-resources/​theme/​keycloak.v2/​admin/​messages/​messages_en.properties Adds the admin console’s English options label.
js/​apps/​account-ui/​test/​mobile-nav.spec.ts Checks the mobile toggle’s accessible name.
js/​apps/​account-ui/​maven-resources/​theme/​keycloak.v3/​account/​messages/​messages_en.properties Adds the account console’s English options label.

Review effort: Balanced

@edewit
edewit enabled auto-merge (squash) November 9, 2026 08:17
@edewit
edewit merged commit 83f0b88 into keycloak:main Nov 9, 2026
95 checks passed
edewit added a commit to edewit/keycloak that referenced this pull request Nov 12, 2026
Restore toggleLabel / aria-label on the icon-only MenuToggle so the
mobile options control has accessible name "Options", matching keycloak#54780.

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account Console / Admin Console masthead: the narrow-width "options-kebab" MenuToggle has no accessible name (axe button-name, WCAG 4.1.2)

3 participants

0