@amsterdam/design-system-css 0.9.0 → 0.11.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 +55 -0
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.css.map +1 -1
- package/dist/alert/alert.css +1 -1
- package/dist/alert/alert.css.map +1 -1
- package/dist/avatar/avatar.css +1 -1
- package/dist/avatar/avatar.css.map +1 -1
- package/dist/breadcrumb/breadcrumb.css +1 -1
- package/dist/breadcrumb/breadcrumb.css.map +1 -1
- package/dist/card/card.css +1 -1
- package/dist/card/card.css.map +1 -1
- package/dist/character-count/character-count.css +1 -0
- package/dist/character-count/character-count.css.map +1 -0
- package/dist/checkbox/checkbox.css +1 -1
- package/dist/checkbox/checkbox.css.map +1 -1
- package/dist/column/column.css +1 -1
- package/dist/column/column.css.map +1 -1
- package/dist/dialog/dialog.css +1 -1
- package/dist/dialog/dialog.css.map +1 -1
- package/dist/field-set/field-set.css +1 -1
- package/dist/field-set/field-set.css.map +1 -1
- package/dist/file-input/file-input.css +1 -1
- package/dist/file-input/file-input.css.map +1 -1
- package/dist/form-error-list/form-error-list.css +1 -0
- package/dist/form-error-list/form-error-list.css.map +1 -0
- package/dist/gap/gap.css +1 -1
- package/dist/gap/gap.css.map +1 -1
- package/dist/header/header.css +1 -1
- package/dist/header/header.css.map +1 -1
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/margin/margin.css.map +1 -1
- package/dist/pagination/pagination.css +1 -1
- package/dist/pagination/pagination.css.map +1 -1
- package/dist/radio/radio.css +1 -1
- package/dist/radio/radio.css.map +1 -1
- package/dist/row/row.css +1 -1
- package/dist/row/row.css.map +1 -1
- package/dist/table-of-contents/table-of-contents.css +1 -0
- package/dist/table-of-contents/table-of-contents.css.map +1 -0
- package/dist/tabs/tabs.css +1 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/top-task-link/top-task-link.css +1 -1
- package/dist/top-task-link/top-task-link.css.map +1 -1
- package/package.json +3 -3
- package/src/common/size.scss +2 -1
- package/src/components/accordion/accordion.scss +1 -0
- package/src/components/alert/README.md +1 -1
- package/src/components/alert/alert.scss +3 -0
- package/src/components/aspect-ratio/README.md +3 -3
- package/src/components/avatar/avatar.scss +30 -5
- package/src/components/breadcrumb/breadcrumb.scss +4 -4
- package/src/components/card/README.md +1 -1
- package/src/components/card/card.scss +4 -3
- package/src/components/{form-field-character-counter → character-count}/README.md +4 -4
- package/src/components/character-count/character-count.scss +20 -0
- package/src/components/checkbox/README.md +3 -3
- package/src/components/checkbox/checkbox.scss +1 -1
- package/src/components/column/README.md +1 -1
- package/src/components/column/column.scss +39 -3
- package/src/components/dialog/README.md +1 -1
- package/src/components/dialog/dialog.scss +12 -10
- package/src/components/field-set/README.md +1 -1
- package/src/components/field-set/field-set.scss +4 -0
- package/src/components/file-input/file-input.scss +1 -1
- package/src/components/footer/README.md +11 -6
- package/src/components/form-error-list/README.md +47 -0
- package/src/components/form-error-list/form-error-list.scss +14 -0
- package/src/components/gap/README.md +22 -1
- package/src/components/gap/gap.scss +4 -2
- package/src/components/grid/README.md +1 -1
- package/src/components/header/README.md +13 -4
- package/src/components/header/header.scss +2 -2
- package/src/components/heading/README.md +7 -6
- package/src/components/heading/heading.scss +6 -6
- package/src/components/icon/README.md +6 -2
- package/src/components/icon-button/README.md +1 -1
- package/src/components/image/README.md +1 -1
- package/src/components/index.scss +3 -1
- package/src/components/link/README.md +1 -1
- package/src/components/margin/README.md +21 -1
- package/src/components/margin/margin.scss +4 -2
- package/src/components/page-heading/README.md +1 -1
- package/src/components/page-menu/README.md +2 -2
- package/src/components/pagination/README.md +3 -3
- package/src/components/pagination/pagination.scss +1 -1
- package/src/components/paragraph/README.md +1 -1
- package/src/components/radio/radio.scss +1 -1
- package/src/components/row/README.md +2 -0
- package/src/components/row/row.scss +45 -2
- package/src/components/search-field/README.md +1 -1
- package/src/components/spotlight/README.md +1 -1
- package/src/components/switch/README.md +2 -2
- package/src/components/table-of-contents/README.md +6 -0
- package/src/components/table-of-contents/table-of-contents.scss +50 -0
- package/src/components/tabs/README.md +1 -1
- package/src/components/tabs/tabs.scss +5 -0
- package/src/components/text-input/README.md +2 -2
- package/src/components/top-task-link/top-task-link.scss +1 -1
- package/src/components/visually-hidden/README.md +8 -2
- package/dist/form-field-character-counter/form-field-character-counter.css +0 -1
- package/dist/form-field-character-counter/form-field-character-counter.css.map +0 -1
- package/src/components/form-field-character-counter/form-field-character-counter.scss +0 -20
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
vertical-align: middle; /* Remove ‘phantom’ white space when image doesn’t load */
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.ams-avatar--black {
|
|
32
|
+
background-color: var(--ams-avatar-black-background-color);
|
|
33
|
+
color: var(--ams-avatar-black-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
.ams-avatar--blue {
|
|
32
37
|
background-color: var(--ams-avatar-blue-background-color);
|
|
33
38
|
color: var(--ams-avatar-blue-color);
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
.ams-avatar--dark-blue {
|
|
37
|
-
background-color: var(--ams-avatar-dark-blue-background-color);
|
|
38
|
-
color: var(--ams-avatar-dark-blue-color);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
41
|
.ams-avatar--dark-green {
|
|
42
42
|
background-color: var(--ams-avatar-dark-green-background-color);
|
|
43
43
|
color: var(--ams-avatar-dark-green-color);
|
|
@@ -48,6 +48,26 @@
|
|
|
48
48
|
color: var(--ams-avatar-green-color);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.ams-avatar--grey-1 {
|
|
52
|
+
background-color: var(--ams-avatar-grey-1-background-color);
|
|
53
|
+
color: var(--ams-avatar-grey-1-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ams-avatar--grey-2 {
|
|
57
|
+
background-color: var(--ams-avatar-grey-2-background-color);
|
|
58
|
+
color: var(--ams-avatar-grey-2-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ams-avatar--grey-3 {
|
|
62
|
+
background-color: var(--ams-avatar-grey-3-background-color);
|
|
63
|
+
color: var(--ams-avatar-grey-3-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ams-avatar--light-blue {
|
|
67
|
+
background-color: var(--ams-avatar-light-blue-background-color);
|
|
68
|
+
color: var(--ams-avatar-light-blue-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
51
71
|
.ams-avatar--magenta {
|
|
52
72
|
background-color: var(--ams-avatar-magenta-background-color);
|
|
53
73
|
color: var(--ams-avatar-magenta-color);
|
|
@@ -68,6 +88,11 @@
|
|
|
68
88
|
color: var(--ams-avatar-red-color);
|
|
69
89
|
}
|
|
70
90
|
|
|
91
|
+
.ams-avatar--white {
|
|
92
|
+
background-color: var(--ams-avatar-white-background-color);
|
|
93
|
+
color: var(--ams-avatar-white-color);
|
|
94
|
+
}
|
|
95
|
+
|
|
71
96
|
.ams-avatar--yellow {
|
|
72
97
|
background-color: var(--ams-avatar-yellow-background-color);
|
|
73
98
|
color: var(--ams-avatar-yellow-color);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.ams-breadcrumb {
|
|
15
|
-
font-family: var(--ams-breadcrumb-font-family
|
|
15
|
+
font-family: var(--ams-breadcrumb-font-family);
|
|
16
16
|
font-size: var(--ams-breadcrumb-font-size);
|
|
17
17
|
font-weight: var(--ams-breadcrumb-font-weight);
|
|
18
18
|
line-height: var(--ams-breadcrumb-line-height);
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
.ams-breadcrumb__item:not(:last-child)::after {
|
|
34
34
|
background-image: var(--ams-breadcrumb-separator-background-image);
|
|
35
35
|
background-repeat: no-repeat;
|
|
36
|
-
block-size:
|
|
36
|
+
block-size: var(--ams-breadcrumb-separator-block-size);
|
|
37
37
|
content: "";
|
|
38
38
|
display: inline-block;
|
|
39
|
-
inline-size:
|
|
40
|
-
margin-inline:
|
|
39
|
+
inline-size: var(--ams-breadcrumb-separator-inline-size);
|
|
40
|
+
margin-inline: var(--ams-breadcrumb-separator-margin-inline);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ams-breadcrumb__link {
|
|
@@ -19,7 +19,7 @@ The link is mandatory.
|
|
|
19
19
|
For referencing a thematic page, use a [top task link](/docs/components-navigation-top-task-link--docs).
|
|
20
20
|
You can also use a [regular link](/docs/components-navigation-link--docs).
|
|
21
21
|
|
|
22
|
-
## Screen
|
|
22
|
+
## Screen readers
|
|
23
23
|
|
|
24
24
|
With a screen reader, you can navigate using headings and links in a document.
|
|
25
25
|
The title of a card is a link within a heading, allowing you to utilize both navigation methods.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
.ams-card {
|
|
7
7
|
display: grid;
|
|
8
|
-
gap:
|
|
8
|
+
gap: var(--ams-card-gap);
|
|
9
9
|
outline-offset: var(--ams-card-outline-offset);
|
|
10
10
|
position: relative;
|
|
11
11
|
touch-action: manipulation;
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
a::after {
|
|
33
33
|
content: "";
|
|
34
34
|
display: block;
|
|
35
|
-
inset: 0;
|
|
35
|
+
inset-block: 0;
|
|
36
|
+
inset-inline: 0;
|
|
36
37
|
position: absolute;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
.ams-card__heading-group {
|
|
41
42
|
display: flex;
|
|
42
43
|
flex-direction: column-reverse;
|
|
43
|
-
gap:
|
|
44
|
+
gap: var(--ams-card-heading-group-gap);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.ams-card__link {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<!-- @license CC0-1.0 -->
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Character Count
|
|
4
4
|
|
|
5
5
|
Help users know how much text they can enter when there is a limit on the number of characters.
|
|
6
6
|
|
|
7
7
|
Users will get updates at a pace that works best for the way they interact with the textarea. This means:
|
|
8
8
|
|
|
9
|
-
- sighted users will see a count message that updates as they type
|
|
9
|
+
- sighted users will see a count message that updates as they type;
|
|
10
10
|
- screen reader users will hear the count announcement when they stop typing.
|
|
11
11
|
|
|
12
12
|
This component does not restrict the user from entering information. The user can enter more than the character limit, but are told they’ve entered too many characters. This lets them type or copy and paste their full answer, then edit it down.
|
|
13
13
|
|
|
14
14
|
## Guidelines
|
|
15
15
|
|
|
16
|
-
- Only use a character
|
|
16
|
+
- Only use a character count when there is a good reason for limiting the number of characters users can enter.
|
|
17
17
|
For example, if there is an indication that users are likely to enter more information than they need to.
|
|
18
18
|
Or when there is a legal or technical reason that means an entry must be no more than a certain number of characters.
|
|
19
|
-
- If your users keep hitting the character limit imposed by the backend of your service then try to increase the limit rather than use a character
|
|
19
|
+
- If your users keep hitting the character limit imposed by the backend of your service then try to increase the limit rather than use a character count.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "../../common/text-rendering";
|
|
7
|
+
|
|
8
|
+
.ams-character-count {
|
|
9
|
+
color: var(--ams-character-count-color);
|
|
10
|
+
font-family: var(--ams-character-count-font-family);
|
|
11
|
+
font-size: var(--ams-character-count-font-size);
|
|
12
|
+
font-weight: var(--ams-character-count-font-weight);
|
|
13
|
+
line-height: var(--ams-character-count-line-height);
|
|
14
|
+
|
|
15
|
+
@include text-rendering;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ams-character-count--error {
|
|
19
|
+
color: var(--ams-character-count-error-color);
|
|
20
|
+
}
|
|
@@ -17,14 +17,14 @@ Allows users to make a selection or agree to terms.
|
|
|
17
17
|
- A list of checkboxes should be in a `fieldset` with a `legend` describing what the list is about.
|
|
18
18
|
For example, if the checkboxes are used to get answers to a question, the `legend` is the question.
|
|
19
19
|
|
|
20
|
-
## Checkbox
|
|
20
|
+
## Checkbox labels
|
|
21
21
|
|
|
22
22
|
A label starts with a capital letter.
|
|
23
23
|
It does not have punctuation at the end if it is a single sentence, word, or fragment.
|
|
24
24
|
It is written in the first person when asking the user to agree to the terms and conditions.
|
|
25
25
|
|
|
26
|
-
## Relevant WCAG
|
|
26
|
+
## Relevant WCAG requirements
|
|
27
27
|
|
|
28
28
|
- [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.
|
|
29
29
|
|
|
30
|
-
Checkbox is an interactive element; therefore, [the general requirements and guidelines for
|
|
30
|
+
Checkbox is an interactive element; therefore, [the general requirements and guidelines for interactivity](/docs/docs-developer-guide-interactivity--docs) apply.
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
font-family: var(--ams-checkbox-font-family);
|
|
41
41
|
font-size: var(--ams-checkbox-font-size);
|
|
42
42
|
font-weight: var(--ams-checkbox-font-weight);
|
|
43
|
-
gap:
|
|
43
|
+
gap: var(--ams-checkbox-gap);
|
|
44
44
|
line-height: var(--ams-checkbox-line-height);
|
|
45
45
|
outline-offset: var(--ams-checkbox-outline-offset);
|
|
46
46
|
|
|
@@ -6,11 +6,47 @@
|
|
|
6
6
|
@import "../../common/size";
|
|
7
7
|
|
|
8
8
|
.ams-column {
|
|
9
|
-
display:
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--ams-column-gap-md);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
@each $size, $label in $ams-sizes {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
@if $size != "md" {
|
|
16
|
+
.ams-column--gap-#{$label} {
|
|
17
|
+
gap: var(--ams-column-gap-#{$size});
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
}
|
|
21
|
+
|
|
22
|
+
.ams-column--align-around {
|
|
23
|
+
justify-content: space-around;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ams-column--align-between {
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ams-column--align-center {
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ams-column--align-end {
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ams-column--align-evenly {
|
|
39
|
+
justify-content: space-evenly;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ams-column--align-horizontal-center {
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ams-column--align-horizontal-end {
|
|
47
|
+
align-items: flex-end;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ams-column--align-horizontal-start {
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
}
|
|
@@ -17,7 +17,7 @@ Sighted users will read the primary action first, in line with the natural readi
|
|
|
17
17
|
The same goes for users of screen readers, who will hear the primary action first, and users of a keyboard, who will focus the primary action first.
|
|
18
18
|
Also, this approach keeps the order of buttons consistent on both narrow and wide screens: if the buttons do not fit next to each other, they get stacked vertically with the primary action on top.
|
|
19
19
|
|
|
20
|
-
## Keyboard
|
|
20
|
+
## Keyboard support
|
|
21
21
|
|
|
22
22
|
| key | function |
|
|
23
23
|
| :---------- | :--------------------------------------------------------------- |
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@mixin reset-dialog {
|
|
7
|
+
inset-block: 0;
|
|
8
|
+
padding-block: 0;
|
|
9
|
+
padding-inline: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
.ams-dialog {
|
|
7
13
|
background-color: var(--ams-dialog-background-color);
|
|
8
14
|
border: var(--ams-dialog-border);
|
|
9
|
-
|
|
15
|
+
inline-size: var(--ams-dialog-inline-size);
|
|
16
|
+
max-block-size: var(--ams-dialog-max-block-size);
|
|
10
17
|
max-inline-size: var(--ams-dialog-max-inline-size);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
position: fixed;
|
|
18
|
+
|
|
19
|
+
@include reset-dialog;
|
|
14
20
|
|
|
15
21
|
/* no token because dialog does not inherit from any element */
|
|
16
22
|
&::backdrop {
|
|
@@ -21,18 +27,14 @@
|
|
|
21
27
|
.ams-dialog__form {
|
|
22
28
|
display: grid;
|
|
23
29
|
gap: var(--ams-dialog-form-gap);
|
|
24
|
-
grid-template-rows: auto 1fr auto;
|
|
25
|
-
max-block-size: var(--ams-dialog-form-max-block-size);
|
|
26
|
-
|
|
27
|
-
// TODO Decide on these widths
|
|
28
30
|
padding-block: var(--ams-dialog-form-padding-block);
|
|
29
31
|
padding-inline: var(--ams-dialog-form-padding-inline);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.ams-dialog__article {
|
|
33
35
|
display: grid;
|
|
34
|
-
gap:
|
|
35
|
-
max-block-size: 100%; /*
|
|
36
|
+
gap: var(--ams-space-md); /* Until we have a consistent way of spacing text elements */
|
|
37
|
+
max-block-size: 100%; /* Safari */
|
|
36
38
|
overflow-y: auto;
|
|
37
39
|
overscroll-behavior-y: contain;
|
|
38
40
|
}
|
|
@@ -8,7 +8,7 @@ A component to group related form inputs.
|
|
|
8
8
|
|
|
9
9
|
- Use Field Set when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single Field Set when asking for an address.
|
|
10
10
|
|
|
11
|
-
## Relevant WCAG
|
|
11
|
+
## Relevant WCAG requirements
|
|
12
12
|
|
|
13
13
|
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Field Set labels the purpose of a group of inputs.
|
|
14
14
|
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
float: inline-start; // [1]
|
|
29
29
|
inline-size: 100%; // [1]
|
|
30
30
|
padding-inline: 0;
|
|
31
|
+
|
|
32
|
+
+ * {
|
|
33
|
+
clear: both; // Reset the applied float for the legend’s first sibling
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
// [1] This combination allows the fieldset border to go around the legend, instead of through it.
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
font-weight: var(--ams-file-input-font-weight);
|
|
22
22
|
line-height: var(--ams-file-input-line-height);
|
|
23
23
|
max-inline-size: calc(100% - var(--ams-file-input-padding-inline) * 2);
|
|
24
|
-
outline-offset:
|
|
24
|
+
outline-offset: calc(var(--ams-focus-outline-offset) * 2); // Compensate for the dashed border
|
|
25
25
|
padding-block: var(--ams-file-input-padding-block);
|
|
26
26
|
padding-inline: var(--ams-file-input-padding-inline);
|
|
27
27
|
touch-action: manipulation;
|
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
# Footer
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Its content provides service information.
|
|
7
|
-
A part is prescribed, and a part is filled based on the website’s objectives.
|
|
5
|
+
Provides service information at the bottom of every page.
|
|
8
6
|
|
|
9
7
|
## Guidelines
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
The Footer consists of a dark blue [Spotlight](/docs/components-containers-spotlight--docs) and a [Page Menu](/docs/components-navigation-page-menu--docs).
|
|
10
|
+
It must be used on all websites for the City of Amsterdam.
|
|
11
|
+
For applications, only the Page Menu can be sufficient.
|
|
12
|
+
The Footer is the same on every page of the application.
|
|
13
|
+
|
|
14
|
+
The Spotlight offers space for various practical links:
|
|
15
|
+
|
|
12
16
|
- The first column focuses on contact information.
|
|
13
17
|
The information is as specific as possible and tailored to the respective website or page (e.g., including a chat option if available).
|
|
14
18
|
- The second column contains links to relevant (online) sites or sources.
|
|
15
19
|
- The third column refers to newsletters, social media, etc.
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
|
|
21
|
+
The menu at the very bottom is intended for links to privacy policies, cookie statements, information about the website itself, etc.
|
|
22
|
+
Contact details should not go here.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
3
|
+
# Form Error List
|
|
4
|
+
|
|
5
|
+
Use this component at the top of a page to summarise any errors a user has made.
|
|
6
|
+
When a user makes an error, you must show both a Form Error List and an Error Message above each answer that contains an error.
|
|
7
|
+
|
|
8
|
+
## Guidelines
|
|
9
|
+
|
|
10
|
+
- Always show a Form Error List when there is a validation error, even if there’s only one.
|
|
11
|
+
- You must link the errors in the Form Error List to the answer they relate to (see below).
|
|
12
|
+
|
|
13
|
+
## Linking from the Form Error List to each answer
|
|
14
|
+
|
|
15
|
+
For questions that require a user to answer using a single field, like a file upload, select, textarea, text input or character count, link to the `id` of that field.
|
|
16
|
+
|
|
17
|
+
When a user has to enter their answer into multiple fields, such as day, month and year fields, link to the `id` of the first field that contains an error.
|
|
18
|
+
If you do not know which field contains an error, link to the `id` of the first field.
|
|
19
|
+
|
|
20
|
+
For questions that require a user to select one or more options from a list using Radios or Checkboxes, link to the `id` of the first Radio or Checkbox.
|
|
21
|
+
|
|
22
|
+
## Where to put the Form Error List
|
|
23
|
+
|
|
24
|
+
Put the Form Error List directly above the first question on the page. Place it outside of the `<form>`-tag, [to make sure screen readers do not skip it](https://nldesignsystem.nl/richtlijnen/formulieren/meerdere-stappen/#plaats-de-informatie-over-waar-de-gebruiker-is-in-de-stappen-boven-het-formulier).
|
|
25
|
+
|
|
26
|
+
## Error count in document title
|
|
27
|
+
|
|
28
|
+
This component adds the error count to the document title,
|
|
29
|
+
in line with [GOV.UK guidelines for informing users about validation errors](https://design-system.service.gov.uk/patterns/validation/#how-to-tell-the-user-about-validation-errors).
|
|
30
|
+
|
|
31
|
+
## Focus on initial render
|
|
32
|
+
|
|
33
|
+
This component receives focus the first time it gets displayed on a page.
|
|
34
|
+
This allows keyboard users to quickly navigate to the errors in the form.
|
|
35
|
+
It also scrolls the component into view if it isn't already.
|
|
36
|
+
Note: this functionality has been disabled on this page, to prevent unexpected focus behaviour.
|
|
37
|
+
|
|
38
|
+
## Relevant WCAG requirements
|
|
39
|
+
|
|
40
|
+
Pay extra attention to these parts:
|
|
41
|
+
|
|
42
|
+
- [WCAG requirement 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): the heading level of the Form Error List depends on where in the page it is placed, this may differ per page.
|
|
43
|
+
|
|
44
|
+
## References
|
|
45
|
+
|
|
46
|
+
- [Show an error summary above the form - NL Design System](https://www.nldesignsystem.nl/richtlijnen/formulieren/foutmeldingen#zet-een-samenvatting-van-de-foutmeldingen-boven-het-formulier)
|
|
47
|
+
- [Error Summary component - Gov.uk](https://design-system.service.gov.uk/components/error-summary/)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.ams-form-error-list {
|
|
2
|
+
outline-offset: var(--ams-form-error-list-outline-offset);
|
|
3
|
+
|
|
4
|
+
// In Chromium browsers, the outline overlaps with the border in this component.
|
|
5
|
+
// We're not sure why, but to fix this we double the offset for Chromium browsers here.
|
|
6
|
+
@supports (contain: paint) and (not (-moz-appearance: none)) {
|
|
7
|
+
outline-offset: calc(var(--ams-form-error-list-outline-offset) * 2);
|
|
8
|
+
|
|
9
|
+
// Reset for Safari
|
|
10
|
+
@supports (font: -apple-system-body) {
|
|
11
|
+
outline-offset: var(--ams-form-error-list-outline-offset);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -2,4 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
# Gap
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Adds white space between a set of elements.
|
|
6
|
+
|
|
7
|
+
## Class names
|
|
8
|
+
|
|
9
|
+
The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are available for the width or height of the gap.
|
|
10
|
+
|
|
11
|
+
| Class name | Preview |
|
|
12
|
+
| ------------- | ----------------------------------------------------------------------------------------- |
|
|
13
|
+
| `ams-gap--xs` | <div className="ams-docs-token-preview--space" style="inline-size: var(--ams-gap-xs);" /> |
|
|
14
|
+
| `ams-gap--sm` | <div className="ams-docs-token-preview--space" style="inline-size: var(--ams-gap-sm);" /> |
|
|
15
|
+
| `ams-gap--md` | <div className="ams-docs-token-preview--space" style="inline-size: var(--ams-gap-md);" /> |
|
|
16
|
+
| `ams-gap--lg` | <div className="ams-docs-token-preview--space" style="inline-size: var(--ams-gap-lg);" /> |
|
|
17
|
+
| `ams-gap--xl` | <div className="ams-docs-token-preview--space" style="inline-size: var(--ams-gap-xl);" /> |
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
- Use this utility class to vertically separate the children of a parent element from each other.
|
|
22
|
+
- It can be used on any element and sets the `gap` CSS property.
|
|
23
|
+
It also makes the element a grid container; the gap would be ignored otherwise.
|
|
24
|
+
These declarations are marked with the `!important` flag to ensure they override any other gaps and display modes.
|
|
25
|
+
- To add a gap between 2 siblings, the first one can be given a [Margin Bottom](/docs/utilities-css-margin--docs) instead.
|
|
26
|
+
This may be preferable because it doesn’t change the parent’s display mode.
|
|
@@ -19,4 +19,4 @@ A cell often spans multiple columns of the grid.
|
|
|
19
19
|
|
|
20
20
|
## Design
|
|
21
21
|
|
|
22
|
-
The [design choices](/docs/
|
|
22
|
+
The [design choices](/docs/brand-design-tokens-grid--docs) are described in the general documentation.
|
|
@@ -2,13 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
# Header
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Displays the City’s logo at the top of every page, and optionally a navigation menu.
|
|
6
|
+
Includes the name of the application if it is not the general website.
|
|
6
7
|
|
|
7
8
|
## Guidelines
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
The Header must be used on all websites and applications for the City of Amsterdam.
|
|
11
|
+
It includes the logo of the City or the organization, the site title (except for the general website), and a menu with links to commonly used pages.
|
|
12
|
+
|
|
13
|
+
The Header is important because it conveys our corporate identity and is the first thing people see.
|
|
14
|
+
Using it consistently helps users recognize and trust the website.
|
|
15
|
+
It is the same on every page of the application.
|
|
16
|
+
|
|
17
|
+
The page menu can contain a maximum of 5 items.
|
|
18
|
+
The last two will often be ‘Search’ and ‘Menu’.
|
|
19
|
+
Labels should be short to ensure the menu fits on one line, even on medium-wide screens.
|
|
20
|
+
An icon can be added to the end of a link to make its function easier to find.
|
|
12
21
|
|
|
13
22
|
## References
|
|
14
23
|
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.ams-
|
|
50
|
+
.ams-header__app-name {
|
|
51
51
|
flex: 1 1 100%;
|
|
52
52
|
|
|
53
53
|
@media screen and (min-width: $ams-breakpoint-wide) {
|
|
54
54
|
min-inline-size: 0;
|
|
55
55
|
order: 2;
|
|
56
56
|
|
|
57
|
-
.ams-
|
|
57
|
+
.ams-header__app-name-heading {
|
|
58
58
|
display: block;
|
|
59
59
|
inline-size: 100%;
|
|
60
60
|
line-height: 1;
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Heading
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Use
|
|
5
|
+
Describes the content that follows it.
|
|
6
|
+
Use Headings to allow the user to grasp the structure of the page quickly.
|
|
7
7
|
|
|
8
8
|
## Guidelines
|
|
9
9
|
|
|
10
10
|
- A heading describes the content beneath it.
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
11
|
+
- Every page should contain one Heading with level 1.
|
|
12
|
+
- Do not skip heading levels, e.g. a level 2 Heading should be followed by one with level 3, not level 4.
|
|
13
|
+
- Do not use a Heading for formatting and styling, but to represent the page’s structure.
|
|
14
|
+
Users of screen readers use headings to navigate the page – an incorrect hierarchy can confuse them.
|
|
14
15
|
|
|
15
|
-
## Relevant WCAG
|
|
16
|
+
## Relevant WCAG requirements
|
|
16
17
|
|
|
17
18
|
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-content-structure-separation-programmatic):
|
|
18
19
|
Text that looks like a heading is also recognized as a heading by a computer.
|
|
@@ -23,32 +23,32 @@
|
|
|
23
23
|
@include reset;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.ams-heading--1 {
|
|
26
|
+
.ams-heading--level-1 {
|
|
27
27
|
font-size: var(--ams-heading-level-1-font-size);
|
|
28
28
|
line-height: var(--ams-heading-level-1-line-height);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.ams-heading--2 {
|
|
31
|
+
.ams-heading--level-2 {
|
|
32
32
|
font-size: var(--ams-heading-level-2-font-size);
|
|
33
33
|
line-height: var(--ams-heading-level-2-line-height);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.ams-heading--3 {
|
|
36
|
+
.ams-heading--level-3 {
|
|
37
37
|
font-size: var(--ams-heading-level-3-font-size);
|
|
38
38
|
line-height: var(--ams-heading-level-3-line-height);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.ams-heading--4 {
|
|
41
|
+
.ams-heading--level-4 {
|
|
42
42
|
font-size: var(--ams-heading-level-4-font-size);
|
|
43
43
|
line-height: var(--ams-heading-level-4-line-height);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.ams-heading--5 {
|
|
46
|
+
.ams-heading--level-5 {
|
|
47
47
|
font-size: var(--ams-heading-level-5-font-size);
|
|
48
48
|
line-height: var(--ams-heading-level-5-line-height);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.ams-heading--6 {
|
|
51
|
+
.ams-heading--level-6 {
|
|
52
52
|
font-size: var(--ams-heading-level-6-font-size);
|
|
53
53
|
line-height: var(--ams-heading-level-6-line-height);
|
|
54
54
|
}
|
|
@@ -6,7 +6,7 @@ Icons are visual symbols used to represent ideas, themes, or actions.
|
|
|
6
6
|
They communicate the message at a glance and draw attention to important (interactive) information.
|
|
7
7
|
Always use an `Icon` component to encapsulate an SVG icon for proper styling and sizing.
|
|
8
8
|
|
|
9
|
-
## Interactive
|
|
9
|
+
## Interactive elements
|
|
10
10
|
|
|
11
11
|
Use an icon to support textual interactive elements like buttons and links.
|
|
12
12
|
Always try to provide accompanying text for an icon.
|
|
@@ -28,4 +28,8 @@ Icons are aligned to the left of the text by default and vertically centred to t
|
|
|
28
28
|
|
|
29
29
|
Icons use the same text levels as all typographic components to determine their size.
|
|
30
30
|
This ensures easy alignment between icons and text.
|
|
31
|
-
[Refer to the typography documentation for more information](/docs/
|
|
31
|
+
[Refer to the typography documentation for more information](/docs/brand-design-tokens-text--docs).
|
|
32
|
+
|
|
33
|
+
## Overview
|
|
34
|
+
|
|
35
|
+
[You can find an overview of the available icons here](/docs/brand-assets-icons--docs).
|
|
@@ -11,6 +11,6 @@ A button containing only an icon.
|
|
|
11
11
|
Only use universally recognized icons, such as a close icon or a play icon.
|
|
12
12
|
- Provide a label text that describes what the button does for screen reader users.
|
|
13
13
|
|
|
14
|
-
## Relevant WCAG
|
|
14
|
+
## Relevant WCAG requirements
|
|
15
15
|
|
|
16
16
|
The Icon Button follows [the same requirements and guidelines as a regular button](/docs/components-buttons-button--docs).
|
|
@@ -17,7 +17,7 @@ Displays an image.
|
|
|
17
17
|
Do this especially for the main image of a page, where the difference between sizes on a narrow and wide screen is most significant.
|
|
18
18
|
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](/docs/components-layout-aspect-ratio--docs) component.
|
|
19
19
|
|
|
20
|
-
## Relevant WCAG
|
|
20
|
+
## Relevant WCAG requirements
|
|
21
21
|
|
|
22
22
|
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content): Non-text content must have a text alternative.
|
|
23
23
|
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text): Use text instead of images of text.
|