Problem/Motivation
DSFR 1.15.4 renders the non-clickable tags of a tags group as span instead of p, as the tag accessibility doc already asked: "Si le tag est utilisé à l’intérieur d’un élément qui possède une sémantique (<p>, li), utiliser un élément <span>."
Upstream: fix(tag): utilisation de span dans groupe de tags https://github.com/GouvernementFR/dsfr/pull/1539 (shipped in 1.15.4, missing from the changelog).
Proposed resolution
We could do as for the badge:
- components/tag: a new tag prop, p (default) or span, for tags without URL that are neither dismissible nor pressable. Clickable tags stay a link, the others stay a button.
- components/tag_group: the slot description asks for span.
- The stories that put tags in a group set span: tag_group, card, tile, grid_row.
API changes
New tag prop on the tag component. The default markup does not change.
Issue fork ui_suite_dsfr-3630719
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 #4
just_like_good_vibesComment #6
just_like_good_vibes