fix(dashboard): move Annuleren inside the keuzelijst card

"Annuleren" rendered as a separate line below the grey card — visually disconnected
from the choice it belongs to. Fixing this properly means the card can't just be one
big <a> anymore: a <button> can't nest inside an anchor (invalid HTML, broken a11y),
and choice-link's [choiceActions] slot needs Annuleren to sit inside the same box.

choice-link.component.ts now makes the card a <div> always, with the title wrapped in
a vendored Bootstrap `.stretched-link` (its ::after overlay keeps the whole card
clickable, same as before) instead of the whole box being the anchor. The projected
action gets its own `position:relative;z-index:2` (in aanvraag-block.component.ts,
which owns that markup) to stay clickable above the stretched-link overlay. Added
`:focus-within` on the card to restore the focus-accent CIBG's `:focus` rule would
have given the card itself, since focus now lands on the inner title link.

Verified: lint/check:tokens/test/build green; drove it end-to-end — clicking anywhere
on a card body still resumes the wizard, clicking Annuleren cancels without navigating.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 16:15:22 +02:00
parent 7ac14557dd
commit a2ed3ae5b8
2 changed files with 39 additions and 25 deletions

View File

@@ -13,13 +13,18 @@ const TYPE_LABELS: Record<AanvraagType, string> = {
/** Organism: one application on the dashboard's "Mijn aanvragen" list, rendered as
a CIBG Huisstijl "keuzelijst" choice (choice-link). Which text/actions it shows
is driven by the pure `blockActions(status)` and the status tag; the block only
renders. Only a resumable Concept is clickable — a resolved status has nothing
to navigate to, so it renders as a plain (non-anchor) row. */
renders. Only a resumable Concept is clickable (stretched-link over the whole
card) — a resolved status has nothing to navigate to, so it renders as a plain
(non-interactive) card. */
@Component({
selector: 'app-aanvraag-block',
imports: [ButtonComponent, ChoiceLinkComponent],
// display:contents — see choice-link.component.ts (keeps <li> a direct <ul> child).
styles: [`:host{display:contents}`],
styles: [`
:host{display:contents} /* see choice-link.component.ts (keeps <li> a direct <ul> child) */
/* Sits inside the same card as the stretched-link title — needs its own
stacking context above the stretched-link overlay (z-index:1) to stay clickable. */
.actions{position:relative;z-index:2;margin-block-start:var(--rhc-space-max-sm)}
`],
template: `
<app-choice-link
[heading]="typeLabel()"
@@ -27,7 +32,7 @@ const TYPE_LABELS: Record<AanvraagType, string> = {
[clickable]="actions().includes('resume')"
(activate)="resume.emit()">
@if (actions().includes('cancel')) {
<div choiceActions>
<div choiceActions class="actions">
<app-button variant="subtle" (click)="cancel.emit()" i18n="@@aanvraagBlock.annuleren">Annuleren</app-button>
</div>
}