@amsterdam/design-system-css 0.3.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 +23 -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/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/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/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/mega-menu/mega-menu.css +1 -0
- package/dist/mega-menu/mega-menu.css.map +1 -0
- package/dist/search-field/search-field.css +1 -1
- package/dist/search-field/search-field.css.map +1 -1
- package/dist/spotlight/spotlight.css +1 -1
- package/dist/spotlight/spotlight.css.map +1 -1
- package/dist/table/table.css +1 -0
- package/dist/table/table.css.map +1 -0
- package/documentation/coding-conventions.md +4 -2
- package/package.json +4 -4
- 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/button/README.md +17 -14
- package/src/components/card/README.md +18 -19
- package/src/components/checkbox/README.md +19 -18
- package/src/components/dialog/README.md +9 -8
- package/src/components/dialog/dialog.scss +0 -16
- package/src/components/footer/README.md +11 -7
- package/src/components/form-label/README.md +5 -1
- package/src/components/grid/README.md +12 -13
- package/src/components/grid/grid.scss +4 -0
- package/src/components/header/README.md +2 -2
- package/src/components/heading/README.md +14 -11
- package/src/components/icon/README.md +19 -9
- package/src/components/icon/icon.scss +5 -0
- 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 -17
- package/src/components/index.scss +5 -0
- 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/mark/README.md +10 -11
- 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 +1 -1
- package/src/components/page-heading/README.md +10 -9
- package/src/components/page-menu/README.md +10 -9
- 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 +18 -18
- package/src/components/search-field/search-field.scss +2 -10
- package/src/components/skip-link/README.md +18 -25
- package/src/components/spotlight/README.md +5 -5
- package/src/components/spotlight/spotlight.scss +4 -4
- 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 +10 -8
- 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/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/heading/heading-css.md +0 -3
- package/src/components/paragraph/paragraph-css.md +0 -3
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
De link is verplicht.
|
|
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.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Guidelines
|
|
9
8
|
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
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).
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## Screen Readers
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.
|
|
@@ -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
|
|
|
@@ -74,19 +74,3 @@
|
|
|
74
74
|
justify-content: end;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
.amsterdam-dialog__close {
|
|
79
|
-
background-color: var(--amsterdam-dialog-close-background-color);
|
|
80
|
-
border: 0;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
padding-block: 0;
|
|
83
|
-
padding-inline: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.amsterdam-dialog__close svg {
|
|
87
|
-
fill: var(--amsterdam-dialog-close-fill);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.amsterdam-dialog__close:hover svg {
|
|
91
|
-
fill: var(--amsterdam-dialog-close-hover-fill);
|
|
92
|
-
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# Footer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The footer is the closing section on every web page.
|
|
4
|
+
Its content provides service information.
|
|
5
|
+
A part is prescribed, and a part is filled based on the website’s objectives.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Guidelines
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- The footer is mandatory, and there is one on every page.
|
|
10
|
+
- The first column focuses on contact information.
|
|
11
|
+
The information is as specific as possible and tailored to the respective website or page (e.g., including a chat option if available).
|
|
12
|
+
- The second column contains links to relevant (online) sites or sources.
|
|
13
|
+
- The third column refers to newsletters, social media, etc.
|
|
14
|
+
- The last part of the footer is intended for links to privacy policies, cookie statements, explanations about the website, etc.
|
|
15
|
+
It is not intended for links to contact information, for example.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
# Form Label
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describes a form control.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
Always associate a form element (such as an `input` or `textarea`) with a label.
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
# Grid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Divides the screen into columns to align the elements of a page.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Every page should use the grid as the foundation for its layout.
|
|
8
|
+
It is placed directly within the [Screen](?path=/docs/layout-screen--docs).
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
De kolommen van alle grids moeten wel precies op elkaar aansluiten.
|
|
10
|
+
A [Footer](?path=/docs/react_containers-footer--docs) and a [Spotlight](?path=/docs/react_containers-spotlight--docs) are slightly wider than the grid.
|
|
11
|
+
You close one instance of the grid before these components.
|
|
12
|
+
Inside and optionally after them, you start a new one.
|
|
13
|
+
Multiple instances of the grid component are possible on a page, but the columns of all grids must align precisely.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Within the grid, you create cells containing the desired content.
|
|
16
|
+
A cell often spans multiple columns of the grid.
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## Design
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
The [design choices](?path=/docs/docs-designrichtlijnen-grid--docs) are described in the design guidelines.
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
--amsterdam-grid-padding-inline: var(--amsterdam-grid-compact-padding-inline);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.amsterdam-grid--gap-vertical--none {
|
|
32
|
+
row-gap: initial;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
.amsterdam-grid--gap-vertical--small {
|
|
32
36
|
row-gap: calc(var(--amsterdam-grid-gap) / 2);
|
|
33
37
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Header
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Arranges the City’s logo, the title of the website, and a page menu.
|
|
4
4
|
|
|
5
5
|
## Guidelines
|
|
6
6
|
|
|
7
7
|
- Use the Header when the site is hosted on amsterdam.nl or one of its subdomains.
|
|
8
8
|
- The page menu can contain a maximum of 5 items, including menu and search.
|
|
9
|
-
- When you have a long subsite title, use no or as
|
|
9
|
+
- When you have a long subsite title, use no or as few page menu items as possible.
|
|
10
10
|
|
|
11
11
|
## References
|
|
12
12
|
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
# Heading
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A heading conveys information about the content below it.
|
|
4
|
+
Use headings to allow the user to grasp the structure of the page quickly.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- A heading describes the content beneath it.
|
|
9
|
+
- Do not use a heading for formatting and styling. Use it to represent the page’s structure.
|
|
10
|
+
- Use headings hierarchically, and do not skip heading levels.
|
|
11
|
+
So, an `h1` heading should be followed by an `h2`, not an `h3`.
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Relevant WCAG Requirements
|
|
12
14
|
|
|
13
15
|
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-content-structure-separation-programmatic):
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- [WCAG 2.4.
|
|
17
|
-
- [WCAG 2.4.
|
|
16
|
+
Text that looks like a heading is also recognized as a heading by a computer.
|
|
17
|
+
Using the correct heading level makes the page structure clear for all users.
|
|
18
|
+
- [WCAG 2.4.1](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-skip): Headings can be used to navigate to the next section with the keyboard.
|
|
19
|
+
- [WCAG 2.4.6](https://www.w3.org/WAI/WCAG21/quickref/#headings-and-labels): Use headings to describe the purpose or subject of the underlying content.
|
|
20
|
+
- [WCAG 2.4.10](https://www.w3.org/WAI/WCAG21/quickref/#qr-navigation-mechanisms-headings): Use headings to structure the content.
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## References
|
|
20
23
|
|
|
21
24
|
- [W3C - Headings](https://www.w3.org/WAI/tutorials/page-structure/headings/)
|
|
22
25
|
- [W3C - Headings & labels](https://www.w3.org/TR/WCAG21/#headings-and-labels)
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
# Icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Icons are visual symbols used to represent ideas, themes, or actions.
|
|
4
|
+
They communicate the message at a glance and draw attention to important (interactive) information.
|
|
5
|
+
Always use an `Icon` component to encapsulate an SVG icon for proper styling and sizing.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Interactive Elements
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Use an icon to support textual interactive elements like buttons and links.
|
|
10
|
+
Always try to provide accompanying text for an icon.
|
|
11
|
+
Only use icons without accompanying text if they adhere to international standards, such as menu (hamburger icon), search (magnifying glass), next, previous, play, pause, etc.
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## Color
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Icons are black or white.
|
|
16
|
+
When used as part of an interactive element, they are dark blue.
|
|
17
|
+
When disabled, they are grey.
|
|
18
|
+
They must adhere to the same contrast ratio for accessibility as typography against a background colour.
|
|
19
|
+
The icon defaults to the colour of the container it is in.
|
|
12
20
|
|
|
13
|
-
##
|
|
21
|
+
## Alignment
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
Icons are aligned to the left of the text by default and vertically centred to the middle of the first line of text.
|
|
16
24
|
|
|
17
|
-
##
|
|
25
|
+
## Size
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
Icons use the same text levels as all typographic components to determine their size.
|
|
28
|
+
This ensures easy alignment between icons and text.
|
|
29
|
+
[Refer to the typography documentation for more information](/docs/docs-designrichtlijnen-typografie--docs#tekstniveaus).
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
fill: currentColor;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.amsterdam-icon--square {
|
|
16
|
+
aspect-ratio: 1 / 1;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.amsterdam-icon--size-3 {
|
|
16
21
|
height: calc(var(--amsterdam-icon-spacious-size-3-font-size) * var(--amsterdam-icon-spacious-size-3-line-height));
|
|
17
22
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Icon Button
|
|
2
|
+
|
|
3
|
+
A button containing only an icon.
|
|
4
|
+
|
|
5
|
+
## Guidelines
|
|
6
|
+
|
|
7
|
+
- Use this button only if the icon is entirely clear and understandable.
|
|
8
|
+
Many icons are interpreted differently by different users.
|
|
9
|
+
Only use universally recognized icons, such as a close icon or a play icon.
|
|
10
|
+
- Provide a label text that describes what the button does for screen reader users.
|
|
11
|
+
|
|
12
|
+
## Relevant WCAG Requirements
|
|
13
|
+
|
|
14
|
+
The Icon Button follows [the same requirements and guidelines as a regular button](https://amsterdam.github.io/design-system/?path=/docs/react_buttons-button--docs).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@mixin reset {
|
|
7
|
+
border: 0;
|
|
8
|
+
padding-block: 0;
|
|
9
|
+
padding-inline: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.amsterdam-icon-button {
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
color: var(--amsterdam-icon-button-color);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
outline-offset: var(--amsterdam-icon-button-outline-offset);
|
|
17
|
+
touch-action: manipulation;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background-color: var(--amsterdam-icon-button-hover-background-color);
|
|
21
|
+
color: var(--amsterdam-icon-button-hover-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
color: var(--amsterdam-icon-button-disabled-color);
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include reset;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.amsterdam-icon-button--on-background-light {
|
|
34
|
+
color: var(--amsterdam-icon-button-on-background-light-color);
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--amsterdam-icon-button-on-background-light-hover-background-color);
|
|
38
|
+
color: var(--amsterdam-icon-button-on-background-light-hover-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
color: var(--amsterdam-icon-button-on-background-light-disabled-color);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.amsterdam-icon-button--on-background-dark {
|
|
48
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-background-color);
|
|
49
|
+
color: var(--amsterdam-icon-button-on-background-dark-color);
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-hover-background-color);
|
|
53
|
+
color: var(--amsterdam-icon-button-on-background-dark-hover-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:disabled {
|
|
57
|
+
background-color: var(--amsterdam-icon-button-on-background-dark-disabled-background-color);
|
|
58
|
+
color: var(--amsterdam-icon-button-on-background-dark-disabled-color);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
# Image
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Displays an image.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Guidelines
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Zorg ervoor dat de afbeelding een beeldverhouding heeft die ondersteund wordt door het [Aspect Ratio](?path=/docs/layout-aspect-ratio--docs) component.
|
|
7
|
+
- Do not forget to include a description of the image in the `alt` attribute.
|
|
8
|
+
This ensures that screen reader users can also access this information.
|
|
9
|
+
Additionally, it can aid in search engine optimization.
|
|
10
|
+
- A description is unnecessary for decorative images; use `alt=""` for these.
|
|
11
|
+
Examples are images that add little to the nearby text or pictures that purely contribute to the design or atmosphere of the page (source: [W3C Web Accessibility Initiative](https://www.w3.org/WAI/tutorials/images/decorative/)).
|
|
12
|
+
- Optionally specify multiple candidates for the image through the `srcSet` attribute.
|
|
13
|
+
For example, provide small, medium, and large variants for various screen sizes.
|
|
14
|
+
This prevents unnecessary downloading of large files.
|
|
15
|
+
Do this especially for the main image of a page, where the difference between sizes on a narrow and wide screen is most significant.
|
|
16
|
+
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](?path=/docs/layout-aspect-ratio--docs) component.
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## Relevant WCAG Requirements
|
|
20
19
|
|
|
21
|
-
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content):
|
|
22
|
-
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text):
|
|
23
|
-
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception):
|
|
20
|
+
- [WCAG 1.1.1](https://www.w3.org/TR/WCAG22/#non-text-content): Non-text content must have a text alternative.
|
|
21
|
+
- [WCAG 1.4.5](https://www.w3.org/TR/WCAG22/#images-of-text): Use text instead of images of text.
|
|
22
|
+
- [WCAG 1.4.9](https://www.w3.org/TR/WCAG22/#images-of-text-no-exception): Use images of text only when there is no alternative.
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* Append here */
|
|
7
|
+
@import "./link-list/link-list";
|
|
8
|
+
@import "./badge/badge";
|
|
9
|
+
@import "./table/table";
|
|
10
|
+
@import "./mega-menu/mega-menu";
|
|
11
|
+
@import "./icon-button/icon-button";
|
|
7
12
|
@import "./skip-link/skip-link";
|
|
8
13
|
@import "./overlap/overlap";
|
|
9
14
|
@import "./header/header";
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
# Link
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A link is a navigation element and can be used independently or inline with text.
|
|
4
|
+
It is the lightweight variant for navigation.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Guidelines
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Use a link in the following cases:
|
|
8
9
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- To navigate to another page within the website or application
|
|
11
|
+
- To navigate to another website (see [External links](#external-links))
|
|
12
|
+
- To navigate to an element on the same page
|
|
13
|
+
- To link to emails or phone numbers (start the link with `mailto:` or `tel:`)
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
A link is a navigation component.
|
|
16
|
+
Use a button instead of a link when an action is desired.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
TODO: According to the spec, you should use a link for downloads as well. Last time I checked, different browsers handled this differently,
|
|
18
|
-
which led to unexpected results. Maybe that changed in the meantime. Do we want to figure this out and describe this in the docs as well?
|
|
19
|
-
-->
|
|
18
|
+
### External links
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Always include `rel="external"` for an external link.
|
|
21
|
+
Avoid `target="_blank"`, but use `rel="external noopener"` if necessary.
|
|
22
|
+
For more information: [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### Visited style
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Visited links indicate that a user has already opened the link.
|
|
27
|
+
We discourage using styles for visited links because they often make the page less clear and navigation more challenging.
|
|
28
|
+
The inline link does have a visited style.
|
|
29
|
+
It is not part of navigation elements that are frequently scanned.
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Relevante WCAG eisen
|
|
31
|
+
## Relevant WCAG Requirements
|
|
30
32
|
|
|
31
33
|
- [WCAG 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum)
|
|
32
34
|
- [WCAG 2.4.4](https://www.w3.org/TR/WCAG21/#link-purpose-in-context)
|
|
33
35
|
- [WCAG 2.5.3](https://www.w3.org/TR/WCAG21/#label-in-name)
|
|
34
36
|
- [WCAG 3.1.2](https://www.w3.org/TR/WCAG21/#language-of-parts)
|
|
35
37
|
|
|
36
|
-
##
|
|
38
|
+
## References
|
|
37
39
|
|
|
38
|
-
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/):
|
|
39
|
-
- [_A comprehensive guide to designing perfect links in UX_,
|
|
40
|
-
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_
|
|
41
|
-
- [_Hover, focus, active_,
|
|
42
|
-
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a):
|
|
40
|
+
- [Links to cross-origin destinations are unsafe](https://developer.chrome.com/docs/lighthouse/best-practices/external-anchors-use-rel-noopener/): Avoid `target="_blank"` or use `rel="external noopener"` if necessary.
|
|
41
|
+
- [_A comprehensive guide to designing perfect links in UX_, on Prototypr](https://blog.prototypr.io/a-guide-to-designing-perfect-links-in-ux-414558f35730): Best practices for links.
|
|
42
|
+
- [_Writing Hyperlinks: Salient, Descriptive, Start with Keyword_ by Norman Nielsen Group](https://www.nngroup.com/articles/writing-links/): How to write good links? An extensive article on links.
|
|
43
|
+
- [_Hover, focus, active_, by Wunder](https://wunder.io/wunderpedia/accessibility/accessible-uis/hover-focus-active/): A good explanation of the states that elements like links and buttons have in browsers.
|
|
44
|
+
- [MDN: `<a>`: The Anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a): Comprehensive overview of all possibilities of links in HTML.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Link List
|
|
2
|
+
|
|
3
|
+
A collection of related links.
|
|
4
|
+
|
|
5
|
+
## Design
|
|
6
|
+
|
|
7
|
+
Every list item starts with a chevron.
|
|
8
|
+
It emphasizes the list structure and thematic coherence.
|
|
9
|
+
The chevron is part of the link.
|
|
10
|
+
Therefore, it is blue and clickable.
|
|
11
|
+
|
|
12
|
+
## Guidelines
|
|
13
|
+
|
|
14
|
+
Use a Link List to present multiple links within a theme.
|
|
15
|
+
|
|
16
|
+
For additional guidelines, refer to the [Link](?path=/docs/navigation-link--docs) component.
|