Problem/Motivation
The Newsletter button in the site header does nothing when clicked. It renders as a <button> element with no link destination:
<button class="btn btn-accent btn-sm rounded-0 d-inline-flex align-items-center justify-content-center gap-2 fw-bold me-3 mb-3">Newsletter</button>The component placement in config/canvas.page_region.vartheme_bs5_rightup.header.yml carries a label of Newsletter but no href key, so the button SDC renders a bare button rather than a link.
The destination already exists: the Newsletter Canvas page is shipped by this recipe at content/canvas_page/10-newsletter.yml and is served at /newsletter. The two menu links labelled Newsletter already point at it correctly; only the header call-to-action button does not.
This is the same class of defect that was fixed for the Horizon Aid footer Subscribe button in #3622817.
Steps to reproduce
- Build a Drupal CMS site and install the RightUp site template:
ddev composer create-project drupal/cms ddev composer config minimum-stability dev ddev composer require drupal/rightup:1.0.x-dev ddev drush si -y ../recipes/rightup - Open the front page.
- Click the green Newsletter button at the top right of the header.
- Nothing happens. Inspect the element: it is a
<button>with nohref.
Proposed resolution
Add "href":"/newsletter" to the header button component inputs in config/canvas.page_region.vartheme_bs5_rightup.header.yml, so the button renders as a link to the Newsletter page this recipe already ships.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
Release notes snippet
- fix: Give the header Newsletter button a link destination. It rendered as a button with no target, so the header newsletter call to action did nothing when clicked.
Issue fork rightup-3622966
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 #4
rajab natshahReleased in rightup 1.0.0-alpha1.
Comment #6
rajab natshah