-
Notifications
You must be signed in to change notification settings - Fork 1
feat(ui): add h1–h6 base typography styles #1746
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
Merged
+172
−51
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b333d8f
feat(ui): add h1–h6 base typography styles to global.css
MartinS-git 6c58a32
feat(ui): add h1–h6 base typography styles to theme.css
MartinS-git 26d2e58
refactor(ui): replace line-height values with Tailwind leading utilit…
MartinS-git 11434dc
feat(ui): align FormattedText heading styles with typography scale
MartinS-git 72c66a4
chore: add changeset for typography scale headings
MartinS-git 1d6fc70
refactor(ui): move h1–h6 into @layer base and use var(--font-sans) in…
MartinS-git 4a60bfe
fix(ui): remove font-bold and text-lg overrides from ContentHeading
MartinS-git 90adb97
chore: update changeset with full list of typography changes
MartinS-git 7aac887
refactor(ui): replace @apply leading utilities with plain CSS in glob…
MartinS-git 314d330
chore(ui): remove Tailwind utility comments from h1–h6 line-height va…
MartinS-git 07a62e7
fix(ui): replace h1 misuse in components with semantically correct el…
MartinS-git 4c98064
fix(ui): update SignInForm test to reflect removed text-xl/font-bold …
MartinS-git 3805d85
fix(ui): use h4 for ReactNode modal titles and add heading level asse…
MartinS-git 713e76b
fix(ui): update Modal test to use heading level 4 instead of div for …
MartinS-git be77926
fix(ui): replace hardcoded font-weight with Tailwind utility and fix …
MartinS-git 35bdb33
fix(ui): remove jn: prefix from @apply font-bold in theme.css for con…
MartinS-git 4af9079
fix(ui): add typography styles to Modal ReactNode title div and corre…
MartinS-git f2aaa3f
fix(ui): align Modal ReactNode title typography with h4 base styles (…
MartinS-git c7eb1ab
fix(ui): add jn:font-sans to Modal ReactNode titlestyles for font-fam…
MartinS-git 77631d9
fix(ui): apply titlestyles to both h4 and div Modal title paths for f…
MartinS-git 05747d1
fix(ui): remove redundant span wrapper in PopupMenuSectionHeading to …
MartinS-git e304ede
refactor(ui): add .juno-h1–.juno-h6 classes for shared heading typogr…
edda b881b0c
fix(ui): replace fixed Modal header height with min-height and align …
MartinS-git c736f09
chore: update changeset with Modal header min-height fix
MartinS-git 78927e2
fix(ui): stretch Modal close button to full header height for larger …
MartinS-git f4bae33
feat(ui): add h6 to FormattedText stories and tests
MartinS-git 9d4ec9d
fix(ui): add heading level assertions to Form/FormSection tests and p…
MartinS-git 8a1b6da
test(ui): add Modal test for empty string title not rendering heading
MartinS-git f2e2adc
fix(ui): call useId unconditionally in Modal to comply with Rules of …
MartinS-git 8a80dfb
Merge branch 'main' into headline-definitions
MartinS-git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| "@cloudoperators/juno-ui-components": minor | ||
| --- | ||
|
|
||
| Add base typography styles for `h1`–`h6` aligned with the Juno design system scale. | ||
|
|
||
| Headings rendered inside Juno apps (and inside `FormattedText`) now use a consistent IBM Plex Sans Bold scale: `h1` 1.69rem, `h2` 1.56rem, `h3` 1.44rem, `h4` 1.28rem, `h5` 1.125rem, `h6` 1rem. | ||
|
|
||
| Matching `.juno-h1`–`.juno-h6` utility classes apply the same scale to non-heading elements (e.g. an element with `role="heading"`). | ||
|
|
||
| **Visual change**: `ContentHeading` now uses the h1 scale (1.69rem) instead of `text-lg` (1.125rem). If you relied on the previous size, override with your own classes. | ||
|
|
||
| **Accessibility fixes**: several components previously used `<h1>` for UI labels regardless of context. They now use semantically appropriate elements so screen reader heading navigation reflects real document structure: | ||
|
|
||
| - `Modal` title: `<h4>` (string title) or `<div role="heading" aria-level={4}>` (ReactNode title); modal header uses `min-height` instead of fixed height, aligns items to the top so long titles wrap without clipping, and the close button stretches to full header height for a larger click target | ||
| - `Form` title: `<h3>` | ||
| - `FormSection` title: `<h4>` | ||
| - `SignInForm` title: `<h2>` | ||
| - `Message` title: `<strong>` (no longer a heading) | ||
| - `IntroBox` title: `<p>` (no longer a heading) | ||
| - `PopupMenuSectionHeading` label: plain text inside `<header>` (no longer a heading) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.