Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve sd-headline a11y #1729

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tidy-seas-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solid-design-system/docs': patch
---

Improve sd-headline stories description and a11y.
7 changes: 5 additions & 2 deletions packages/docs/src/stories/styles/headline.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const { overrideArgs } = storybookHelpers('sd-headline');
const { generateTemplate } = storybookTemplate('sd-headline');

/**
* Used as a crucial element for displaying content hierarchy and to enhance accessibility.
* Used to display content hierarchy and visually emphasize text.
* It is semantically agnostic to ensure flexibility between visual and content hierarchy, however,
* it is recommended to pair it with appropriate semantic elements (e.g., <h1> through <h6>)
* to ensure a robust content structure.
*
* **Related templates**:
* - [Headline with Mark](?path=/docs/templates-mark--docs)
Expand Down Expand Up @@ -41,7 +44,7 @@ export default {
export const Default = {
render: (args: any) => {
return generateTemplate({
options: { templateContent: '<h4 class="%CLASSES%">%SLOT%</h4>' },
options: { templateContent: '<h2 class="%CLASSES%">%SLOT%</h2>' },
args
});
}
Expand Down
Loading