Loading
fix: #3631078 Mark the footer Copy link with the copy-link class for the theme's HTMX handler
Issue: https://www.drupal.org/i/3631078
- The Copy link menu item keeps
role: buttonand gains acopy-linkclass. Its inlinehx-on-clickis removed: core 11.4.10'sAttributeXssstripshx-*andon*from menu link content, as htmx's own security advice says to do for user content. - The HTMX handler (
hx-on:click, core'score/drupal.htmx) is added by the theme's social media menu template to the link with that class: https://www.drupal.org/i/3631079 (vartheme_bs5_rightup!68 (merged)). - The footer step checks
a.copy-link[hx-on\:click]. hx-onuses eval, so a site with a strict Content Security Policy needs'unsafe-eval'inscript-src.
Existing sites keep their old menu link. Update it once with:
drush php:eval '$l = \Drupal::service("entity.repository")->loadEntityByUuid("menu_link_content", "870f0549-cf5e-5a90-ac55-d68d3318fd19"); $o = $l->link->first()->options; unset($o["attributes"]["hx-on-click"]); $o["attributes"]["class"] = array_values(array_unique(array_merge((array) $o["attributes"]["class"], ["copy-link"]))); $l->link->first()->options = $o; $l->save();'
drush crMerge order: merge !68 (merged) first and let the 1.0.x-dev theme repackage, then this MR, then rebase !84 (merged). This MR's footer job stays red until then, because it checks the handler that !68 (merged) adds. For 1.0.6: release Vartheme BS5 Rightup 1.0.6, then raise !83 (merged)'s theme pin from ~1.0.5 to ~1.0.6 and rebase it on 1.0.x.
01-06-front-end-pages.feature passes locally on core 11.4.10 with both changes: 28 scenarios, 304 steps.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
Edited by Rajab Natshah