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.
Issue fork display_builder-3640659
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
Comment #2
mogtofu33 commentedComment #4
mogtofu33 commented