Generated with the help of an LLM.

Problem/Motivation

LanguageSwitcher builds raw sl-menu-item tags, each with an inline onclick setting window.location.href.

A strict Content Security Policy blocks inline handlers, and raw Shoelace tags in PHP are one more place to change for #3616153: Plan: Migrate from Shoelace to Webawesome.

Proposed resolution

Pass the languages as items of display_builder:menu, which already renders item.url as a link.

Its items take no attributes yet, and the switcher needs its language_switcher_LANGCODE test IDs. Add an attributes key to menu items. The zoom and viewport menus could then use the component too.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Assigned: Unassigned » mogtofu33
Status: Active » Needs work

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs work » Needs review