@amsterdam/design-system-css 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/LICENSE.md +1 -1
- package/README.md +2 -1
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.css.map +1 -1
- package/dist/badge/badge.css +1 -0
- package/dist/badge/badge.css.map +1 -0
- package/dist/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.css.map +1 -1
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/grid/grid.css +1 -1
- package/dist/grid/grid.css.map +1 -1
- package/dist/header/header.css +1 -0
- package/dist/header/header.css.map +1 -0
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/icon/icon.css +1 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon-button/icon-button.css +1 -0
- package/dist/icon-button/icon-button.css.map +1 -0
- package/dist/image/image.css +1 -1
- package/dist/image/image.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/link-list/link-list.css +1 -0
- package/dist/link-list/link-list.css.map +1 -0
- package/dist/logo/logo.css +1 -1
- package/dist/logo/logo.css.map +1 -1
- package/dist/mark/mark.css +1 -0
- package/dist/mark/mark.css.map +1 -0
- package/dist/mega-menu/mega-menu.css +1 -0
- package/dist/mega-menu/mega-menu.css.map +1 -0
- package/dist/overlap/overlap.css +1 -0
- package/dist/overlap/overlap.css.map +1 -0
- package/dist/page-menu/page-menu.css +1 -1
- package/dist/page-menu/page-menu.css.map +1 -1
- package/dist/search-field/search-field.css +1 -0
- package/dist/search-field/search-field.css.map +1 -0
- package/dist/skip-link/skip-link.css +1 -0
- package/dist/skip-link/skip-link.css.map +1 -0
- package/dist/spotlight/spotlight.css +1 -0
- package/dist/spotlight/spotlight.css.map +1 -0
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/dist/text-input/text-input.css +1 -0
- package/dist/text-input/text-input.css.map +1 -0
- package/dist/visually-hidden/visually-hidden.css +1 -1
- package/dist/visually-hidden/visually-hidden.css.map +1 -1
- package/documentation/coding-conventions.md +4 -2
- package/package.json +5 -5
- package/src/components/accordion/README.md +45 -38
- package/src/components/alert/README.md +15 -11
- package/src/components/alert/alert.scss +8 -38
- package/src/components/aspect-ratio/README.md +12 -12
- package/src/components/badge/README.md +10 -0
- package/src/components/badge/badge.scss +58 -0
- package/src/components/blockquote/README.md +8 -8
- package/src/components/breadcrumb/README.md +10 -7
- package/src/components/breadcrumb/breadcrumb.scss +6 -15
- package/src/components/button/README.md +17 -14
- package/src/components/card/README.md +18 -6
- package/src/components/checkbox/README.md +19 -18
- package/src/components/checkbox/checkbox.scss +3 -3
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +0 -17
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/grid/README.md +20 -0
- package/src/components/grid/grid.scss +44 -0
- package/src/components/header/README.md +14 -0
- package/src/components/header/header.scss +85 -0
- package/src/components/heading/README.md +14 -11
- package/src/components/heading/heading.scss +20 -0
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +5 -18
- package/src/components/icon-button/README.md +14 -0
- package/src/components/icon-button/icon-button.scss +60 -0
- package/src/components/image/README.md +16 -12
- package/src/components/image/image.scss +4 -0
- package/src/components/index.scss +12 -2
- package/src/components/link/README.md +26 -24
- package/src/components/link-list/README.md +16 -0
- package/src/components/link-list/link-list.scss +80 -0
- package/src/components/logo/README.md +21 -20
- package/src/components/logo/logo.scss +1 -0
- package/src/components/mark/README.md +17 -0
- package/src/components/mark/mark.scss +8 -0
- package/src/components/mega-menu/README.md +1 -0
- package/src/components/mega-menu/mega-menu.scss +14 -0
- package/src/components/ordered-list/README.md +5 -5
- package/src/components/overlap/README.md +3 -0
- package/src/components/overlap/overlap.scss +12 -0
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-menu/README.md +10 -9
- package/src/components/page-menu/page-menu.scss +2 -18
- package/src/components/pagination/README.md +13 -10
- package/src/components/paragraph/README.md +16 -14
- package/src/components/screen/README.md +12 -12
- package/src/components/search-field/README.md +33 -0
- package/src/components/search-field/search-field.scss +73 -0
- package/src/components/skip-link/README.md +26 -0
- package/src/components/skip-link/skip-link.scss +28 -0
- package/src/components/spotlight/README.md +15 -0
- package/src/components/spotlight/spotlight.scss +36 -0
- package/src/components/switch/README.md +11 -9
- package/src/components/table/README.md +11 -0
- package/src/components/table/table.scss +36 -0
- package/src/components/text-input/README.md +14 -0
- package/src/components/text-input/text-input.scss +57 -0
- package/src/components/top-task-link/README.md +15 -14
- package/src/components/unordered-list/README.md +5 -5
- package/src/components/visually-hidden/README.md +3 -2
- package/src/components/visually-hidden/visually-hidden.scss +4 -6
- package/dist/grid/grid-cell.css +0 -1
- package/dist/grid/grid-cell.css.map +0 -1
- package/dist/highlight/highlight.css +0 -1
- package/dist/highlight/highlight.css.map +0 -1
- package/src/components/button/button-css.md +0 -12
- package/src/components/checkbox/checkbox-css.md +0 -3
- package/src/components/footer/footer-css.md +0 -11
- package/src/components/grid/README.grid-cell.md +0 -14
- package/src/components/grid/README.grid.md +0 -17
- package/src/components/grid/grid-cell.scss +0 -46
- package/src/components/heading/heading-css.md +0 -3
- package/src/components/highlight/README.md +0 -15
- package/src/components/highlight/highlight.scss +0 -36
- package/src/components/paragraph/paragraph-css.md +0 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.4.0",
|
|
3
3
|
"author": "Community for NL Design System",
|
|
4
4
|
"description": "CSS files for components for the City of Amsterdam based on the NL Design System architecture",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"clean": "rimraf dist/"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@amsterdam/design-system-tokens": "0.
|
|
23
|
-
"sass": "1.
|
|
22
|
+
"@amsterdam/design-system-tokens": "0.4.0",
|
|
23
|
+
"sass": "1.70.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@utrecht/components": "
|
|
26
|
+
"@utrecht/components": "3.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "3bc9765e9de9553db5b643d2ed79735837d4d7b6"
|
|
29
29
|
}
|
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
# Accordion
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- [WCAG
|
|
39
|
-
|
|
40
|
-
|
|
3
|
+
The accordion component is a clickable (vertically stacked) list of headings to hide or show associated content.
|
|
4
|
+
With an accordion, you offer content to users progressively.
|
|
5
|
+
|
|
6
|
+
## Guidelines
|
|
7
|
+
|
|
8
|
+
- Use an accordion on a full page with essential and non-essential content.
|
|
9
|
+
- Hiding non-essential content helps users get to important content more quickly.
|
|
10
|
+
- Avoid using an accordion to avoid too much essential content on 1 page.
|
|
11
|
+
- Rewrite the page more compactly or divide the content over multiple pages instead of using the accordion in the first place.
|
|
12
|
+
- Don’t hide essential information in an accordion.
|
|
13
|
+
- An accordion consists of several accordion sections.
|
|
14
|
+
- Use a minimum of 3 and a maximum of 10 sections underneath each other.
|
|
15
|
+
- It is essential for accordion sections to have clear headings, as the user cannot "scan" the hidden content to find relevant information.
|
|
16
|
+
- Hiding the content has the disadvantage that "search in page" does not yield any hidden content results.
|
|
17
|
+
- If you know the search term the user used to get to the accordion page, you can automatically expand the sections that contain the search term.
|
|
18
|
+
- The accordion’s content may contain formatting (e.g. headings, lists, links and buttons).
|
|
19
|
+
|
|
20
|
+
You can navigate an accordion with your keyboard:
|
|
21
|
+
|
|
22
|
+
| key | element |
|
|
23
|
+
| :------------- | :-------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| Enter or Space | Open or close the accordion section that has the focus |
|
|
25
|
+
| Tab | Go to the next element that can have focus |
|
|
26
|
+
| Shift + Tab | Go to the next element that can have focus |
|
|
27
|
+
| Down arrow | If an accordion section has focus, go to the next section; if the last section has focus, go to the first section |
|
|
28
|
+
| Up arrow | If an accordion section has focus, go to the previous section; if the first section has focus, go to the last section |
|
|
29
|
+
| Home | If an accordion section has focus: go to the first section |
|
|
30
|
+
| End | If an accordion section has focus, go to the last section |
|
|
31
|
+
|
|
32
|
+
## Relevant WCAG requirements
|
|
33
|
+
|
|
34
|
+
The WCAG requirements for the Button and Heading components also apply to the accordion header.
|
|
35
|
+
|
|
36
|
+
Pay extra attention to these parts:
|
|
37
|
+
|
|
38
|
+
- [WCAG requirement 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): the heading level of the accordion sections depends on where in the page the accordion is placed, this may differ per page.
|
|
39
|
+
- [WCAG requirement 1.3.6](https://www.w3.org/TR/WCAG21/#identify-purpose): use `aria-controls` for the button, and use a `region` landmark for the expandable region (use the HTML element `<section>` for this)
|
|
40
|
+
- [WCAG requirement 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum): contrast between text and background and between icon and background is sufficient in all variants, all interactive statuses and all possible combinations.
|
|
41
|
+
- [WCAG requirement 3.2.1](https://www.w3.org/TR/WCAG21/#on-focus): do not automatically make the accordion expanded when the button gets focus.
|
|
42
|
+
- [WCAG requirement 2.1.3](https://www.w3.org/TR/WCAG21/#keyboard-no-exception): Support the optional keys: `Down Arrow`, `Up Arrow`, `Home` and `End`.
|
|
43
|
+
- `Space` should activate the button, not scroll the page (use `keypressEvt.preventDefault()`).
|
|
44
|
+
- [WCAG requirement 2.4.6](https://www.w3.org/TR/WCAG21/#headings-and-labels): The text used both as a heading and as a label for the button must be clear because the content is not always visible.
|
|
45
|
+
- [WCAG requirement 2.4.10](https://www.w3.org/TR/WCAG21/#section-headings): accordions that are part of the running text must use section headings.
|
|
46
|
+
|
|
47
|
+
## References
|
|
41
48
|
|
|
42
49
|
- [W3C - Accordion Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# Alert
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An Alert informs the user of a significant or time-sensitive message without interrupting their task.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Specifications
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
There are four types of notifications:
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- **Warning** (orange) when action is needed to prevent damage.
|
|
10
|
+
- **Error** (red) indicates an error has occurred.
|
|
11
|
+
- **Confirmation** (green) to reassure that a process is complete.
|
|
12
|
+
- **Notification** (blue) to bring attention to a message.
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Guidelines
|
|
14
15
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
16
|
+
- Place an orange Alert directly below the Header for important and urgent information.
|
|
17
|
+
Examples: system outage or changes in the opening hours of a City Office.
|
|
18
|
+
- Ensure sufficient whitespace around the Alert.
|
|
19
|
+
The grid’s whitespace is a good reference – place the Alert in its own cell.
|
|
20
|
+
- By default, the Alert cannot be closed.
|
|
21
|
+
This functionality can be added optionally.
|
|
22
|
+
- Optionally, the title can be omitted.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
.amsterdam-alert {
|
|
7
7
|
align-items: flex-start;
|
|
8
|
-
|
|
9
|
-
border: var(--amsterdam-alert-border);
|
|
8
|
+
border-style: var(--amsterdam-alert-border-style);
|
|
9
|
+
border-width: var(--amsterdam-alert-border-width);
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: row;
|
|
12
12
|
gap: var(--amsterdam-alert-gap);
|
|
@@ -21,48 +21,18 @@
|
|
|
21
21
|
flex: auto;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@mixin reset {
|
|
25
|
-
-webkit-text-size-adjust: 100%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.amsterdam-alert__title {
|
|
29
|
-
color: var(--amsterdam-alert-title-color);
|
|
30
|
-
font-family: var(--amsterdam-alert-title-font-family);
|
|
31
|
-
font-size: var(--amsterdam-alert-title-spacious-font-size);
|
|
32
|
-
font-weight: var(--amsterdam-alert-title-font-weight);
|
|
33
|
-
line-height: var(--amsterdam-alert-title-spacious-line-height);
|
|
34
|
-
|
|
35
|
-
.amsterdam-theme--compact & {
|
|
36
|
-
font-size: var(--amsterdam-alert-title-compact-font-size);
|
|
37
|
-
line-height: var(--amsterdam-alert-title-compact-line-height);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@include reset;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
24
|
.amsterdam-alert--error {
|
|
44
|
-
background-color: var(--amsterdam-alert-error-background-color);
|
|
45
25
|
border-color: var(--amsterdam-alert-error-border-color);
|
|
46
26
|
}
|
|
47
27
|
|
|
48
|
-
.amsterdam-alert--
|
|
49
|
-
|
|
50
|
-
border-color: var(--amsterdam-alert-success-border-color);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* todo: move to action button component */
|
|
54
|
-
.amsterdam-alert__close {
|
|
55
|
-
background-color: var(--amsterdam-alert-close-background-color);
|
|
56
|
-
border: 0;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
padding-block: 0;
|
|
59
|
-
padding-inline: 0;
|
|
28
|
+
.amsterdam-alert--info {
|
|
29
|
+
border-color: var(--amsterdam-alert-info-border-color);
|
|
60
30
|
}
|
|
61
31
|
|
|
62
|
-
.amsterdam-
|
|
63
|
-
|
|
32
|
+
.amsterdam-alert--success {
|
|
33
|
+
border-color: var(--amsterdam-alert-success-border-color);
|
|
64
34
|
}
|
|
65
35
|
|
|
66
|
-
.amsterdam-
|
|
67
|
-
|
|
36
|
+
.amsterdam-alert--warning {
|
|
37
|
+
border-color: var(--amsterdam-alert-warning-border-color);
|
|
68
38
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Aspect Ratio
|
|
2
2
|
|
|
3
|
-
Aspect Ratio
|
|
3
|
+
Aspect Ratio updates the height of an element with its width.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
These are the proportions we use:
|
|
6
6
|
|
|
7
|
-
|
|
|
8
|
-
| :-------- |
|
|
9
|
-
| `2x-wide` |
|
|
10
|
-
| `x-wide` |
|
|
11
|
-
| `wide` |
|
|
12
|
-
| `square` |
|
|
13
|
-
| `tall` |
|
|
14
|
-
| `x-tall` |
|
|
7
|
+
| keyword | ratio |
|
|
8
|
+
| :-------- | ----: |
|
|
9
|
+
| `2x-wide` | 32:9 |
|
|
10
|
+
| `x-wide` | 16:9 |
|
|
11
|
+
| `wide` | 5:4 |
|
|
12
|
+
| `square` | 1:1 |
|
|
13
|
+
| `tall` | 4:5 |
|
|
14
|
+
| `x-tall` | 9:16 |
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Guidelines
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Use this component to constrain images, videos and other elements to one of the available aspect ratios.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
A prominently coloured box containing 1 or 2 words.
|
|
4
|
+
Guides the user in taking a specific action or describes its surrounding content.
|
|
5
|
+
|
|
6
|
+
## Design
|
|
7
|
+
|
|
8
|
+
The badge can contain a short text or a number.
|
|
9
|
+
The default background colour is dark green.
|
|
10
|
+
Suggestions on when to use the other colours will follow soon.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2024 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-badge {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
font-family: var(--amsterdam-badge-font-family);
|
|
9
|
+
font-size: var(--amsterdam-badge-spacious-font-size);
|
|
10
|
+
font-weight: var(--amsterdam-badge-font-weight);
|
|
11
|
+
line-height: var(--amsterdam-badge-spacious-line-height);
|
|
12
|
+
padding-inline: var(--amsterdam-badge-padding-inline);
|
|
13
|
+
|
|
14
|
+
.amsterdam-theme--compact & {
|
|
15
|
+
font-size: var(--amsterdam-badge-compact-font-size);
|
|
16
|
+
line-height: var(--amsterdam-badge-compact-line-height);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.amsterdam-badge--blue {
|
|
21
|
+
background-color: var(--amsterdam-badge-blue-background-color);
|
|
22
|
+
color: var(--amsterdam-badge-blue-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.amsterdam-badge--dark-blue {
|
|
26
|
+
background-color: var(--amsterdam-badge-dark-blue-background-color);
|
|
27
|
+
color: var(--amsterdam-badge-dark-blue-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.amsterdam-badge--dark-green {
|
|
31
|
+
background-color: var(--amsterdam-badge-dark-green-background-color);
|
|
32
|
+
color: var(--amsterdam-badge-dark-green-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.amsterdam-badge--green {
|
|
36
|
+
background-color: var(--amsterdam-badge-green-background-color);
|
|
37
|
+
color: var(--amsterdam-badge-green-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.amsterdam-badge--magenta {
|
|
41
|
+
background-color: var(--amsterdam-badge-magenta-background-color);
|
|
42
|
+
color: var(--amsterdam-badge-magenta-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.amsterdam-badge--orange {
|
|
46
|
+
background-color: var(--amsterdam-badge-orange-background-color);
|
|
47
|
+
color: var(--amsterdam-badge-orange-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.amsterdam-badge--purple {
|
|
51
|
+
background-color: var(--amsterdam-badge-purple-background-color);
|
|
52
|
+
color: var(--amsterdam-badge-purple-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.amsterdam-badge--yellow {
|
|
56
|
+
background-color: var(--amsterdam-badge-yellow-background-color);
|
|
57
|
+
color: var(--amsterdam-badge-yellow-color);
|
|
58
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Blockquote
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
We use blockquotes to emphasize citations.
|
|
4
|
+
A quote appears differently from the main text to make it stand out.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- Quote someone’s literal written or oral text.
|
|
9
|
+
- A quote has a width of half or a whole column of text.
|
|
10
|
+
- The component adds the correct quotation marks.
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
- Een citaat heeft een breedte van een halve of hele tekstkolom.
|
|
12
|
+
## Relevant WCAG requirements
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- [WCAG 3.1.2](https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts.html): wanneer het citaat in een andere taal is geschreven dan de pagina, dan moet het `lang` attribuut gebruikt worden om de taal duidelijk te maken.
|
|
14
|
+
- [WCAG 3.1.2](https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts.html): if the citation is in a language other than that of the surrounding content, indicate so through the `lang` attribute.
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# Breadcrumb
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The breadcrumb is a secondary navigation pattern that helps a user understand the structure between levels in the website up to the current page.
|
|
4
|
+
Users can use it to navigate.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
###
|
|
8
|
+
### Use like this
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Only use the breadcrumb trail if it adds something functional for the user and the structure is ‘static’.
|
|
10
11
|
|
|
11
|
-
###
|
|
12
|
+
### Avoid this
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Do not display the breadcrumb trail on a form page.
|
|
15
|
+
It distracts the user from their task, or one can accidentally interpret it as a Progress Indicator.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
It is a secondary navigation pattern.
|
|
18
|
+
It can’t replace the main navigation.
|
|
@@ -25,27 +25,22 @@
|
|
|
25
25
|
.amsterdam-breadcrumb__list {
|
|
26
26
|
break-after: avoid;
|
|
27
27
|
break-inside: avoid;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-wrap: wrap;
|
|
30
|
-
gap: 0.5rem;
|
|
31
|
-
list-style: none;
|
|
32
28
|
|
|
33
29
|
@include reset;
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
.amsterdam-breadcrumb__item {
|
|
37
|
-
|
|
38
|
-
display: flex;
|
|
33
|
+
display: inline;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
.amsterdam-breadcrumb__item:not(:last-child)::after {
|
|
42
|
-
background-
|
|
43
|
-
|
|
37
|
+
background-image: var(--amsterdam-breadcrumb-separator-background-image);
|
|
38
|
+
background-repeat: no-repeat;
|
|
44
39
|
content: "";
|
|
45
40
|
display: inline-block;
|
|
46
|
-
height:
|
|
47
|
-
margin-inline
|
|
48
|
-
width:
|
|
41
|
+
height: 1ex;
|
|
42
|
+
margin-inline: 0.5rem;
|
|
43
|
+
width: 1ex;
|
|
49
44
|
}
|
|
50
45
|
|
|
51
46
|
.amsterdam-breadcrumb__link {
|
|
@@ -55,10 +50,6 @@
|
|
|
55
50
|
text-decoration-thickness: var(--amsterdam-breadcrumb-item-link-text-decoration-thickness);
|
|
56
51
|
text-underline-offset: var(--amsterdam-breadcrumb-item-link-text-underline-offset);
|
|
57
52
|
|
|
58
|
-
&::first-letter {
|
|
59
|
-
text-transform: capitalize;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
53
|
&:hover {
|
|
63
54
|
color: var(--amsterdam-breadcrumb-item-link-hover-color);
|
|
64
55
|
text-decoration-line: var(--amsterdam-breadcrumb-item-link-hover-text-decoration-line);
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Allows the user to perform actions and operate the user interface.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
7
|
+
- A label text that describes the function of the button.
|
|
8
|
+
- A clear contrasting colour scheme so that it is easy to recognize and quickly locate.
|
|
9
|
+
- Use the correct type of button for the corresponding application.
|
|
10
|
+
For example, a button within a form must always be of the type `submit`.
|
|
11
|
+
- Make sure one can operate a button through a keyboard.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Relevant WCAG requirements
|
|
13
14
|
|
|
14
|
-
- [WCAG
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
15
|
+
- [WCAG requirement 2.1.3](https://www.w3.org/TR/WCAG21/#keyboard-no-exception):
|
|
16
|
+
You can activate the button with `Enter` or `Space`, and it is possible with ‘Tab’ the button to focus.
|
|
17
|
+
Using `Space` does not result in scrolling the page.
|
|
18
|
+
- [WCAG requirement 2.4.6](https://www.w3.org/TR/WCAG21/#headings-and-labels): the label of the button must be clear
|
|
19
|
+
- [WCAG requirement 2.5.2](https://www.w3.org/TR/WCAG21/#pointer-cancellation):
|
|
20
|
+
- do not use the `mousedown` event to activate the button, instead use the `click` event
|
|
21
|
+
- `mousedown` may only be used if `mouseup` undoes the effect, for example, a “fast forward” button to fast-forward audio or video.
|
|
22
|
+
- [WCAG requirement 2.5.5](https://www.w3.org/TR/WCAG21/#target-size): The button must be large enough to click, and small buttons should not be too close to another button.
|
|
20
23
|
|
|
21
|
-
##
|
|
24
|
+
## References
|
|
22
25
|
|
|
23
26
|
- [W3C - Focus Visible](https://www.w3.org/WAI/WCAG21/Understanding/focus-visible.html)
|
|
24
27
|
- [W3C - Headings & labels](https://www.w3.org/TR/WCAG21/#headings-and-labels)
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use a card on an overview page to link to an article page, such as a news article, a job vacancy, or a search result.
|
|
4
|
+
The card typically includes the title, introduction, and an image of the content.
|
|
5
|
+
The link is mandatory.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Guidelines
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
- The title of a card is a link within a heading.
|
|
10
|
+
The same guidelines as for regular [links](?path=/docs/react_navigation-link--docs) and [headings](?path=/docs/react_text-heading--docs) apply here.
|
|
11
|
+
The link is active across the entire area of the card.
|
|
12
|
+
- A card needs more content than just a title.
|
|
13
|
+
Supplement this with textual and/or visual content.
|
|
14
|
+
- Place the text in a regular paragraph.
|
|
15
|
+
Only use the smallest text size for a tagline or date.
|
|
16
|
+
- This component may not be the best option if the content does not represent a detailed page.
|
|
17
|
+
For referencing a thematic page, use a [top task link](?path=/docs/react_navigation-top-task-link--docs).
|
|
18
|
+
You can also use a [regular link](?path=/docs/react_navigation-link--docs).
|
|
8
19
|
|
|
9
|
-
##
|
|
20
|
+
## Screen Readers
|
|
10
21
|
|
|
11
|
-
|
|
12
|
-
|
|
22
|
+
With a screen reader, you can navigate using headings and links in a document.
|
|
23
|
+
The title of a card is a link within a heading, allowing you to utilize both navigation methods.
|
|
24
|
+
A screen reader reads the title first, followed by the rest of the content.
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
# Checkbox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Allows users to make a selection or agree to terms.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
7
|
+
- Checkboxes are used for one or multiple choices that do not exclude each other.
|
|
8
|
+
- Each checkbox operates independently of other checkboxes in a list at the same hierarchical level.
|
|
9
|
+
Checking an additional checkbox does not affect other selections in that list.
|
|
10
|
+
- You can use a checkbox for bulk selection or deselection of an entire list of checkboxes.
|
|
11
|
+
Still, it should be clear that the bulk selection checkbox is at a different hierarchical level than the list being fully selected or deselected.
|
|
12
|
+
- Use a group of checkboxes to filter data on a page, in a menu, or within a component.
|
|
13
|
+
- A checkbox can answer a closed question if multiple answers are possible.
|
|
14
|
+
- A list of checkboxes is vertically stacked to enhance readability and usability.
|
|
15
|
+
- A list of checkboxes should be in a `fieldset` with a `legend` describing what the list is about.
|
|
16
|
+
For example, if the checkboxes are used to get answers to a question, the `legend` is the question.
|
|
14
17
|
|
|
15
|
-
## Checkbox
|
|
18
|
+
## Checkbox Labels
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
A label starts with a capital letter.
|
|
21
|
+
It does not have punctuation at the end if it is a single sentence, word, or fragment.
|
|
22
|
+
It is written in the first person when asking the user to agree to the terms and conditions.
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
- ... heeft geen interpunctie aan het einde als het een enkele zin, woord of fragment is.
|
|
21
|
-
- ... is in de eerste persoon geschreven als het gaat om de vraag of de gebruiker akkoord gaat met de algemene voorwaarden
|
|
24
|
+
## Relevant WCAG Requirements
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html): It is clear for both users and programmatically what the purpose of a form field is.
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Checkbox is een interactief element, hier gelden [de algemene eisen en richtlijnen voor interactieve elementen](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) voor.
|
|
28
|
+
Checkbox is an interactive element; therefore, [the general requirements and guidelines for interactive elements](https://amsterdam.github.io/design-system/?path=/docs/docs-designrichtlijnen-interactieve-elementen--docs) apply.
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
|
|
54
54
|
&:hover {
|
|
55
55
|
color: var(--amsterdam-checkbox-hover-color);
|
|
56
|
-
text-decoration: underline;
|
|
57
|
-
text-decoration-thickness:
|
|
58
|
-
text-underline-offset:
|
|
56
|
+
text-decoration-line: underline;
|
|
57
|
+
text-decoration-thickness: 0.125rem;
|
|
58
|
+
text-underline-offset: 0.375rem;
|
|
59
59
|
|
|
60
60
|
.amsterdam-checkbox__checkmark::after {
|
|
61
61
|
border-color: var(--amsterdam-checkbox-checkmark-hover-border-color);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Dialog
|
|
2
2
|
|
|
3
|
-
A Dialog allows the user to focus on one task or a piece of information
|
|
3
|
+
A Dialog allows the user to focus on one task or a piece of information by popping up and blocking the page content until the modal task is completed or until the user dismisses the action.
|
|
4
4
|
|
|
5
5
|
## Guidelines
|
|
6
6
|
|
|
7
|
-
- Use
|
|
8
|
-
- Use
|
|
7
|
+
- Use dialogs sparingly because they interrupt the user’s workflow.
|
|
8
|
+
- Use a dialog for short and non-frequent tasks.
|
|
9
|
+
Consider using the main flow for regular tasks.
|
|
9
10
|
|
|
10
11
|
## Keyboard Support
|
|
11
12
|
|
|
12
|
-
| key | function
|
|
13
|
-
| :---------- |
|
|
14
|
-
| Tab | Moves focus to next focusable element inside the dialog. |
|
|
15
|
-
| Shift + Tab | Moves focus to previous focusable element inside the dialog. |
|
|
16
|
-
| Escape | Closes the dialog.
|
|
13
|
+
| key | function |
|
|
14
|
+
| :---------- | :--------------------------------------------------------------- |
|
|
15
|
+
| Tab | Moves focus to the next focusable element inside the dialog. |
|
|
16
|
+
| Shift + Tab | Moves focus to the previous focusable element inside the dialog. |
|
|
17
|
+
| Escape | Closes the dialog. |
|
|
17
18
|
|
|
18
19
|
## References
|
|
19
20
|
|