Skip to content

Commit

Permalink
fix: stop separation of heading and sub heading by screen reader (#3491)
Browse files Browse the repository at this point in the history
Co-authored-by: karimim <[email protected]>
  • Loading branch information
2 people authored and oliverschuerch committed Oct 8, 2024
1 parent 3551745 commit f2968b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/clean-icons-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-documentation': patch
'@swisspost/design-system-styles': patch
---

Improved accessibility of headings with subheadings by removing the <br> element and added the utility class d-block. Consult https://design-system.post.ch/?path=/docs/7ecd87f1-de96-4e39-a057-ba1798eb6959--docs for updated markup.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ export const Default: Story = {
const tagName = unsafeStatic(args.level);
const content = args.showSubtitle
? html`
<span>${args.title}</span>
<br />
<span class="d-block">${args.title}</span>
<span class="fw-light">${args.subtitle}</span>
`
: args.title;
Expand Down

0 comments on commit f2968b9

Please sign in to comment.