You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- you need to show short and informative time-limited messages
9
-
- the information concerns an error that affects only one part of the system or a minor function
10
-
-there are connection issues or API errors that are likely to be resolved by reloading the page
8
+
- you have short and informative messaging that is important to highlight
9
+
- the information has a semantic meaning (error, success, info, warning)
10
+
-you need to inform about minor or technical errors
11
11
12
12
**Avoid Alert when**
13
-
- the error prevents further use of the service, use an [error page](/en/patterns/systemnotifications#when-do-we-use-error-pages) instead
14
-
- you need to notify the user about an error in a single form field, use the component’s own error message [validation message](/en/components/docs/validation-message/overview)
15
-
- the message is a static info box, use [card](/en/components/docs/card/overview) instead
16
-
- multiple error messages need to be summarised, use [error summary](/en/components/docs/error-summary/overview) instead
13
+
- you need to notify the user about an error in a single form field, use the component’s own error message [validation message](/en/components/docs/validation-message/overview) instead, and [error summary](/en/components/docs/error-summary/overview) to summarise multiple errors
14
+
- you want to highlight content visually
17
15
18
16
For more comprehensive guidelines on how to use alerts in services, see the pattern for [System notifications](/en/patterns/systemnotifications). There you will find examples and recommendations on when to use alert, and when other solutions may be more appropriate.
19
17
@@ -58,34 +56,26 @@ If the title and description repeat the same thing, it is better to use a simple
58
56
59
57
### With link
60
58
61
-
You can have a link in the alert if it helps the user solve the task. But be aware that a link takes the user out of the service, so use links only when absolutely necessary, for example if you want the user to open a form or perform an important task.
59
+
You can include a link in the alert if it is necessary for the user to complete their task. Remember that links take the user out of the service, so they should be used with caution, for example when opening forms or performing other important actions.
62
60
63
61
<Storystory="MedLenkeEn" />
64
62
65
63
## Guidelines
66
-
Alert is used to display important messages that require attention, but not necessarily action. It can be used to inform the user about the status, changes, or problems in a solution. The message is displayed clearly and visually distinguished from the rest of the content.
67
64
68
-
Use the component with caution. Users can confuse alerts with advertising, and thus ignore them. If we use alerts too often, we can exacerbate this problem.
65
+
Alert is used to display important messages that require attention. It can be used to inform the user about the status, changes, or problems in a solution.
69
66
70
-
Make sure that alert has the same look and feel across all services and products. This component should be recognizable everywhere, so we should not adjust it.
71
-
72
-
**Suitable for**
73
-
- provide short and informative time-limited notifications
74
-
- inform about errors that only affect one part of the system or a minor function
75
-
- inform about connection problems or API errors that are likely to be resolved by reloading the page
67
+
Use alert with caution. Users can confuse alerts with advertising, and thus ignore them. If we use alerts too often, we can exacerbate this problem.
76
68
77
-
**Not suitable for**
78
-
- validate individual form elements, instead use the component's own error message (See [validation message](/en/components/docs/validation-message/overview))
79
-
- summarize multiple error messages in a form, instead use [error summary](/en/components/docs/error-summary/overview)
80
-
- display errors that prevent all further use of the service, instead use an error page
81
-
- display static information that should be displayed all the time, instead use [card](/en/components/docs/card/overview)
69
+
Make sure that alert has the same look and feel across all services and products. This component should be recognizable everywhere, so we should not adjust it.
82
70
83
71
## Text
84
72
85
73
It is not always easy to understand the difference between the notifications, even though they have different icons and colours. Therefore, it is important that the text we write in the notification is clear and easy to understand.
86
74
87
75
If there is something users need to or can do to get through their task, the text should convey that. When the message is longer than a sentence, it may be a good idea to include a heading that highlights the most important points.
88
76
77
+
Avoid multiple alerts on the same page, as it can confuse the user and make it difficult to understand what is important.
78
+
89
79
Here is a list of the types of information that a notification should contain:
Copy file name to clipboardExpand all lines: apps/www/app/content/components/alert/metadata.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
{
2
2
"no": {
3
3
"title": "Alert",
4
-
"subtitle": "`Alert` gir brukeren informasjon som det er ekstra viktig at de ser og forstår. Komponenten er designet for å fange brukernes oppmerksomhet. Teksten i varselet skal være kort og tydelig."
4
+
"subtitle": "Alert gir brukeren informasjon som det er ekstra viktig at de ser og forstår. Komponenten er designet for å fange brukernes oppmerksomhet. Teksten i varselet skal være kort og tydelig."
5
5
},
6
6
"en": {
7
7
"title": "Alert",
8
-
"subtitle": "`Alert` provides users with information that is especially important for them to see and understand. The component is designed to capture users' attention. The text in the alert should be short and clear."
8
+
"subtitle": "Alert provides users with information that is especially important for them to see and understand. The component is designed to capture users' attention. The text in the alert should be short and clear."
-det er korte og informative tidsbegrensede varsler
9
-
-det er informasjon om feil som kun påvirker én del av systemet eller en mindre funksjon
10
-
-det oppstår tilkoblingsproblemer eller API-feil som vil løse seg med en ny innlasting av siden
8
+
-du skal vise et kort og informativt varsel som er viktig å fremheve
9
+
-du skal formidle informasjon med en semantisk betydning (som feil, suksess, informasjon eller advarsel)
10
+
-du skal informere om mindre eller tekniske feil
11
11
12
12
**Unngå Alert når**
13
-
- feilen hindrer all videre bruk av tjenesten, bruk [feilside](/no/patterns/systemnotifications#når-bruker-vi-feilsider) i stedet
14
-
- du skal gjøre brukeren oppmerksom på feil i enkeltfelt, bruk heller komponentens egen feilmelding [validation message](/no/components/docs/validation-message/overview)
15
-
- varslene er statiske infobokser, bruk heller [card](/no/components/docs/card/overview)
16
-
- flere feilmeldinger skal oppsummeres, bruk heller [error summary](/no/components/docs/error-summary/overview)
13
+
- du skal gjøre brukeren oppmerksom på feil i enkeltfelt, bruk heller komponentens egen feilmelding [validation message](/no/components/docs/validation-message/overview) og [error summary](/no/components/docs/error-summary/overview) for å oppsummere flere feil
14
+
- du ønsker å fremheve innhold visuelt
17
15
18
16
For mer helhetlige retningslinjer for bruk av varsler i tjenester, se mønsteret for [Systemvarsler](/no/patterns/systemnotifications). Der finner du eksempler og anbefalinger for når du skal bruke alert, og når andre løsninger passer bedre.
19
17
@@ -61,15 +59,15 @@ Dersom tittel og beskrivelse gjentar det samme er det bedre å bruke en enkel se
61
59
### Med lenke
62
60
63
61
Du kan ha en lenke i alert hvis det hjelper brukeren med å løse oppgaven.
64
-
Men vær obs på at en lenke tar brukeren ut av tjenesten, så bruk lenke kun når det er absolutt nødvendig, for eksempel hvis du vil at brukeren skal åpne et skjema eller utføre en viktig oppgave.
62
+
Husk at lenker tar brukeren ut av tjenesten, så bruk dem kun når det er nødvendig, for eksempel hvis du vil at brukeren skal åpne et skjema eller utføre en viktig oppgave.
65
63
66
64
<Storystory="MedLenke" />
67
65
68
66
## Retningslinjer
69
67
70
-
Alert brukes for å vise viktige meldinger som krever oppmerksomhet, men ikke nødvendigvis handling. Den kan brukes til å informere brukeren om status, endringer eller problemer i en løsning. Meldingen vises tydelig og skiller seg visuelt fra resten av innholdet.
68
+
Alert brukes til å vise viktige meldinger som krever oppmerksomhet. Den kan brukes til å informere brukeren om status, endringer eller problemer i en løsning.
71
69
72
-
Bruk komponenten varsomt. Brukere kan forveksle varsler med reklame, og dermed overse dem.
70
+
Bruk alert varsomt. Brukere kan forveksle varsler med reklame, og dermed overse dem.
73
71
Hvis vi bruker varsler for ofte, kan vi forverre dette problemet.
74
72
75
73
Pass på at alert har samme utseende og formspråk i alle tjenester og produkter.
@@ -81,6 +79,8 @@ Det er ikke alltid lett å forstå forskjellen på varslene, selv om de har ulik
81
79
82
80
Hvis det er noe brukerne må eller kan gjøre for å komme videre med oppgaven sin, skal teksten formidle dette. Når meldingen er lengre enn en setning, kan det være lurt å ha med en overskrift som fremhever det viktigste.
83
81
82
+
Unngå flere alerts på samme side, da det kan forvirre brukeren og gjøre det vanskelig å forstå hva som er viktig.
83
+
84
84
Her er en liste med hvilken type informasjon varsel bør inneholde:
0 commit comments