♿ [#2345] A11y replace disallowed heading tags in Cards #1224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
issue: if there is no content, then there should not be any headings.
Taiga: https://taiga.maykinmedia.nl/project/open-inwoner/task/2345
Cards that only have an image and no text content at all, should use a paragraph that may visually look like a Heading.
A real Heading is an HTML tag that should summarize/pin-point the section below it, but in case of an image it does not make sense in accessibility/meaningfulness.
Also screen-readers will read out headings as a list with hierarchy, so there better be something meaningful there.
Note : it is outside of the scope of this issue but some of the other cards are incorrect as well - in case a card has only a title, it's again not really a heading. Example: the sub-category card here: https://open-inwoner-test.maykin.nl/onderwerpen/vervoer/
And on the Profile page it is better to just consistently use paragraphs, since many of the 'Overzicht' cards do not have 'meaningful' content when read by a screenreader as a hierarchical list.
Perhaps none of the cards need a true Heading tag, but at least our 'Aanvragen/Vragen/Samenwerkingen' cards have a lot more content that may benefit from having a heading.
Also note: NL Design System has its own Card component, which we are not using yet in OIP.