Problem/Motivation
The DSFR Link doc recommends rel="noopener external" on links opening an external site in a new window, and the library's shared action template always sets it with target="_blank" (link, button, footer, navigation, side menu…). Our components set rel="noopener" only (link, button), replace a rel given by the site, or set nothing at all (footer, main navigation, side menu). Link and button also miss a target="_blank" passed in the attributes, as menu links pass it.
Proposed resolution
Whenever a link opens in a new window, set rel="noopener external", keeping a rel given by the site:
- link and button: when external is on, target is blank, or the attributes carry target="_blank";
- footer, main navigation and side menu: on items with target="_blank". The side menu also gets the "- new window" title.
Share keeps rel="noopener", as the upstream share template does.
The deprecated download_block is left as is.
Issue fork ui_suite_dsfr-3626463
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
just_like_good_vibesComment #5
just_like_good_vibes