Skip to content

Conversation

@jiromaykin
Copy link
Contributor

@jiromaykin jiromaykin commented Jan 16, 2025

B-tags should not be used lightly, usually these need to be replaced with a STRONG tag or a correct styling class, since B has no meaning and is only a visual tag (but we should use CSS for that).
Strong has emphasis in meaning and tone, which is useful to (for example) notify the user there is no data available.
Screen-reader software responds differently to B-tags and Strong tags so they are more than just a 'style'.
Issue: https://taiga.maykinmedia.nl/project/open-inwoner/task/2955

Also: it is NOT allowed to use H2 headings if that heading has no paragraph and doesn't actually summarize any content - for accessibility software Headings have a specific meaning and are read out loud as a list with nested hierarchy.

So: if there is data, then it is fine to use the H2, but if there isn't, it should be a paragraph.

Additionally we should aim to always use the NLDS classes for headings, so municipalities can overwrite these with their own tokens.

The Heading hierarchy should be correct for accessibility, and it is perfectly acceptable to use the H3 CSS style for an H2 heading, as long as the HTML structure stays correct.

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.23%. Comparing base (3cb42c1) to head (121409b).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1566   +/-   ##
========================================
  Coverage    94.23%   94.23%           
========================================
  Files         1070     1070           
  Lines        39412    39412           
========================================
  Hits         37140    37140           
  Misses        2272     2272           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jiromaykin jiromaykin marked this pull request as draft January 20, 2025 09:54
@jiromaykin jiromaykin force-pushed the issue/2955-A11y-remove-b-tags branch 2 times, most recently from 2a471f7 to 9b0440b Compare January 21, 2025 10:52
@jiromaykin jiromaykin marked this pull request as ready for review January 21, 2025 10:52
@jiromaykin jiromaykin force-pushed the issue/2955-A11y-remove-b-tags branch from 713a68f to 121409b Compare January 21, 2025 11:39
@alextreme alextreme merged commit a877df0 into develop Jan 22, 2025
22 checks passed
@alextreme alextreme deleted the issue/2955-A11y-remove-b-tags branch January 22, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants