-
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
Open
MartinS-git
wants to merge
21
commits into
main
Choose a base branch
from
headline-definitions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
21 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 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
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,20 @@ | ||
| --- | ||
| "@cloudoperators/juno-ui-components": minor | ||
| --- | ||
|
|
||
| Add h1–h6 base typography styles aligned with the Juno design system scale. | ||
|
|
||
| - `global.css` and `theme.css`: h1–h6 defined in `@layer base` with IBM Plex Sans Bold, rem font sizes, and plain CSS `line-height` values. `theme.css` uses `var(--font-sans)` instead of a hardcoded font stack. | ||
| - `FormattedText`: heading sizes and line-heights aligned with the scale; h5 corrected (1.03rem → 1.125rem); h6 added; redundant `font-weight`/`font-style` declarations removed. | ||
| - `ContentHeading`: removed `jn:font-bold` and `jn:text-lg` overrides that were overriding the h1 base style with a smaller size. | ||
|
|
||
| Fix h1 misuse in components that rendered UI labels as `<h1>`, which caused unintended size changes after the global h1 style was introduced. Heading levels were chosen to reflect both visual size and accessibility (correct heading outline for screen readers). | ||
|
|
||
| - `Modal`: title changed from `<h1>` to `<h4>`. The modal has `role="dialog"` which creates an isolated landmark; the title is referenced via `aria-labelledby`. A heading inside a dialog is semantically correct and independent of the page outline. `<h4>` matches the previous visual size (~20px). | ||
| - `Form`: title changed from `<h1>` to `<h3>`. A form is a named content section; a heading is appropriate. `<h3>` matches the previous visual size (~24px). | ||
| - `FormSection`: title changed from `<h1>` to `<h4>`. One level below `Form` (`<h3>`) in the heading hierarchy. `<h4>` was chosen over `<h5>` (visual match) to maintain correct nesting. | ||
| - `SignInForm`: title changed from `<h1>` to `<h2>`. The form is often the primary content of a page but may also be embedded; `<h2>` is a safe default for both cases. | ||
| - `IntroBox`: title changed from `<h1>` to `<p>`. An info box is not a navigable section; adding it to the heading outline would confuse screen reader users navigating by heading. Bold styling preserved via existing `introboxHeading` class. | ||
| - `global.css`: replaced `font-weight: 700` with `@apply jn:font-bold` in h1–h6 base styles for consistency with Tailwind conventions. | ||
| - `theme.css`: same — replaced `font-weight: 700` with `@apply font-bold` (no `jn:` prefix, consistent with existing `@apply` usage in that file). | ||
| - `Modal`: ReactNode titles now render as `<div role="heading" aria-level={4}>` instead of `<h4>` to avoid invalid HTML (block elements inside heading elements). String titles remain `<h4>`. Both approaches are equivalent for assistive technologies. |
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.
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.