Skip to content

Commit

Permalink
feat: use styles for showing headers instead of heading. This is a ac…
Browse files Browse the repository at this point in the history
…cessibility enhancement.
  • Loading branch information
tujoworker committed Jan 30, 2019
1 parent d3ca2fc commit 8a7831c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/dnb-design-system-portal/src/shared/menu/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const linkStyle = css`
transition: background-color 0.5s ease;
`

const Header = styled.h3`
const Header = styled.span`
margin: 0;
text-align: center;
Expand Down Expand Up @@ -175,11 +175,11 @@ export default class Card extends PureComponent {
>
<Box>
<Svg {...svgParams} />
<Header>{title}</Header>
<Header className="dnb-lead">{title}</Header>
<About>{about}</About>
</Box>

<BottomWrapper>
<BottomWrapper aria-hidden>
<Button
variant="tertiary"
icon="chevron_right"
Expand Down
5 changes: 5 additions & 0 deletions packages/dnb-ui-lib/src/style/themes/dnb-theme-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ h6 > small {
line-height: 0; // for vertical alignment, we have to have no line-height
}

.dnb-h1,
.dnb-h2,
.dnb-lead,
h1,
h2,
h3,
Expand All @@ -37,6 +40,7 @@ h6 {
color: var(--color-emerald-green);
}

.dnb-h1,
h1 {
font-size: var(--font-size-xx-large); // 48px
line-height: 3.5rem; // 56px
Expand All @@ -49,6 +53,7 @@ h1 > small {
line-height: 3rem; // 48px
}

.dnb-h2,
h2 {
font-size: var(--font-size-medium); // 24px
font-size: 2rem; // 24px
Expand Down

0 comments on commit 8a7831c

Please sign in to comment.