@holmdigital/components 2.0.0 → 2.1.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/README.md +2 -4
- package/dist/AccessibilityStatement/AccessibilityStatement.js +109 -177
- package/dist/AccessibilityStatement/AccessibilityStatement.mjs +1 -1
- package/dist/chunk-OFTOD72G.mjs +462 -0
- package/dist/index.js +109 -177
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-FKSBWEX3.mjs +0 -529
package/README.md
CHANGED
|
@@ -106,16 +106,14 @@ function App() {
|
|
|
106
106
|
/>
|
|
107
107
|
|
|
108
108
|
<AccessibilityStatement
|
|
109
|
-
country="
|
|
110
|
-
sector="public"
|
|
109
|
+
country="NO"
|
|
111
110
|
organizationName="HolmDigital"
|
|
112
111
|
websiteUrl="https://holmdigital.se"
|
|
113
112
|
complianceLevel="partial"
|
|
114
113
|
lastReviewDate={new Date()}
|
|
115
114
|
publishDate={new Date('2024-02-06')}
|
|
116
115
|
contactEmail="hej@holmdigital.se"
|
|
117
|
-
|
|
118
|
-
locale="sv"
|
|
116
|
+
locale="no"
|
|
119
117
|
/>
|
|
120
118
|
|
|
121
119
|
<Button variant="primary" type="submit">
|
|
@@ -25,132 +25,60 @@ __export(AccessibilityStatement_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(AccessibilityStatement_exports);
|
|
26
26
|
var import_standards = require("@holmdigital/standards");
|
|
27
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var ENFORCEMENT_BODIES = {
|
|
29
|
-
SE: "Myndigheten f\xF6r digital f\xF6rvaltning (Digg)",
|
|
30
|
-
NO: "Digitaliseringsdirektoratet (uutilsynet)",
|
|
31
|
-
DK: "Digitaliseringsstyrelsen",
|
|
32
|
-
FI: "Regionf\xF6rvaltningsverket i S\xF6dra Finland (AVI)",
|
|
33
|
-
NL: "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties (BZK)",
|
|
34
|
-
DE: "BFIT-Bund (\xDCberwachungsstelle des Bundes f\xFCr Barrierefreiheit von Informationstechnik)",
|
|
35
|
-
FR: "Direction interminist\xE9rielle du num\xE9rique (DINUM)",
|
|
36
|
-
ES: "Ministerio para la Transformaci\xF3n Digital y de la Funci\xF3n P\xFAblica",
|
|
37
|
-
IE: "National Disability Authority (NDA)",
|
|
38
|
-
GB: "Equality and Human Rights Commission (EHRC)",
|
|
39
|
-
US: "Department of Justice (Civil Rights Division)",
|
|
40
|
-
CA: "Accessibility Commissioner (Canadian Human Rights Commission)",
|
|
41
|
-
EU: "Europeiska kommissionen (DG CNECT)"
|
|
42
|
-
};
|
|
43
28
|
var TEMPLATES = {
|
|
44
|
-
sv:
|
|
45
|
-
|
|
46
|
-
{<organisation>} st\xE5r bakom den h\xE4r webbplatsen. Vi vill att s\xE5 m\xE5nga som m\xF6jligt ska kunna anv\xE4nda den. Det h\xE4r dokumentet beskriver hur {<webbplats>} uppfyller lagen om tillg\xE4nglighet till digital offentlig service, eventuella k\xE4nda tillg\xE4nglighetsproblem och hur du kan rapportera brister till oss s\xE5 att vi kan \xE5tg\xE4rda dem.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{<brister>}
|
|
84
|
-
]
|
|
85
|
-
|
|
86
|
-
## Hur vi testat webbplatsen
|
|
87
|
-
|
|
88
|
-
{Vi har gjort en sj\xE4lvskattning (intern testning) av {<webbplats>}./{<extern akt\xF6r>} har gjort en oberoende granskning av {<webbplats>}./Vi har uppskattat tillg\xE4ngligheten utan granskning.}
|
|
89
|
-
|
|
90
|
-
Senaste bed\xF6mningen gjordes den {<bed\xF6mningsdatum>}.
|
|
91
|
-
|
|
92
|
-
[Granskningsmetod: {<metod>}]
|
|
93
|
-
|
|
94
|
-
Webbplatsen publicerades den {<publiceringsdatum>}.
|
|
95
|
-
|
|
96
|
-
Redog\xF6relsen uppdaterades senast den {<uppdateringsdatum>}.`,
|
|
97
|
-
en: `Accessibility of {<website>}
|
|
98
|
-
|
|
99
|
-
This website is run by {<organisation>}. We want as many people as possible to be able to use it, and this document describes how {<website>} complies with the accessibility regulations, any known accessibility issues, and how you can report problems so that we can fix them.
|
|
100
|
-
|
|
101
|
-
## How accessible is the website?
|
|
102
|
-
|
|
103
|
-
{There are no known accessibility issues with this website./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information.}
|
|
104
|
-
|
|
105
|
-
## What to do if you can\u2019t access parts of this website?
|
|
106
|
-
|
|
107
|
-
If you need content from this website that is not accessible for you, but is not within the scope of the accessibility regulations as described below, please contact us.
|
|
108
|
-
|
|
109
|
-
[Our normal response time is {<response time>}.]
|
|
110
|
-
|
|
111
|
-
[You can also contact us in the following ways:
|
|
112
|
-
|
|
113
|
-
* email {<email address>}
|
|
114
|
-
* call {<telephone number>}]
|
|
115
|
-
|
|
116
|
-
## Reporting accessibility problems with this website
|
|
117
|
-
|
|
118
|
-
We\u2019re always looking to improve the accessibility of this website. If you find any problems that aren\u2019t listed on this page or if we\u2019re not meeting the requirements of the accessibility regulations, contact us and let us know about the problem.
|
|
119
|
-
|
|
120
|
-
## Enforcement procedure
|
|
121
|
-
|
|
122
|
-
The {<enforcement_body>} is responsible for enforcing the web accessibility regulations. If you experience accessibility issues on our website, you can submit a complaint to {<enforcement_body>}.
|
|
123
|
-
|
|
124
|
-
You can also submit a complaint to {<enforcement_body>} if you think that our assessment of what constitutes a disproportionate burden should be reviewed, if you think that our accessibility statement is inadequate, or it you think that your request for excluded content in an accessible format has not been handled correctly.
|
|
125
|
-
|
|
126
|
-
## Technical information about this website\u2019s accessibility
|
|
127
|
-
|
|
128
|
-
{This website is fully compliant with the accessibility regulations./This website is partially compliant with the accessibility regulations, due to the non-compliances listed below./This website is not compliant with the accessibility regulations. The non-accessible sections are listed below.}
|
|
129
|
-
|
|
130
|
-
## Non-accessible content
|
|
131
|
-
|
|
132
|
-
The content described below is, in one way or another, not fully accessible.
|
|
133
|
-
|
|
134
|
-
[
|
|
135
|
-
### Non-compliance with the accessibility regulations
|
|
136
|
-
|
|
137
|
-
{<issues>}
|
|
138
|
-
]
|
|
139
|
-
|
|
140
|
-
## How we tested this website
|
|
141
|
-
|
|
142
|
-
{We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}
|
|
143
|
-
|
|
144
|
-
The last assessment was made on {<assessment date>}.
|
|
145
|
-
|
|
146
|
-
[Assessment method: {<method>}]
|
|
147
|
-
|
|
148
|
-
The website was published on {<publish date>}.
|
|
149
|
-
|
|
150
|
-
The statement was last updated on {<update date>}.`
|
|
29
|
+
sv: {
|
|
30
|
+
title: "Tillg\xE4nglighet f\xF6r {<webbplats>}",
|
|
31
|
+
intro: "{<organisation>} st\xE5r bakom den h\xE4r webbplatsen. Vi vill att s\xE5 m\xE5nga som m\xF6jligt ska kunna anv\xE4nda den. Det h\xE4r dokumentet beskriver hur {<webbplats>} uppfyller lagen om tillg\xE4nglighet till digital offentlig service, eventuella k\xE4nda tillg\xE4nglighetsproblem och hur du kan rapportera brister till oss s\xE5 att vi kan \xE5tg\xE4rda dem.",
|
|
32
|
+
sections: [
|
|
33
|
+
{ id: "how-accessible", title: "Hur tillg\xE4nglig \xE4r webbplatsen?", content: "{Vi har inga k\xE4nda brister i tillg\xE4ngligheten f\xF6r den h\xE4r webbplatsen./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information.}" },
|
|
34
|
+
{ id: "what-to-do", title: "Vad kan du g\xF6ra om du inte kan anv\xE4nda delar av webbplatsen?", content: "Om du beh\xF6ver inneh\xE5ll fr\xE5n {<webbplats>} som inte \xE4r tillg\xE4ngligt f\xF6r dig, men som \xE4r undantaget fr\xE5n lagens till\xE4mpningsomr\xE5de enligt beskrivning nedan, kan du meddela oss.\n\n[Svarstiden \xE4r normalt {<svarstid>}.]\n\n[Du kan ocks\xE5 kontakta oss p\xE5 f\xF6ljande s\xE4tt:\n\n* skicka e-post till {<e-postadress>}\n* ring {<telefonnummer>}]" },
|
|
35
|
+
{ id: "reporting", title: "Rapportera brister i webbplatsens tillg\xE4nglighet", content: "Vi str\xE4var hela tiden efter att f\xF6rb\xE4ttra webbplatsens tillg\xE4nglighet. Om du uppt\xE4cker problem som inte \xE4r beskrivna p\xE5 den h\xE4r sidan, eller om du anser att vi inte uppfyller lagens krav, meddela oss s\xE5 att vi f\xE5r veta att problemet finns." },
|
|
36
|
+
{ id: "enforcement", title: "Tillsyn", content: "{<enforcement_body>} har ansvaret f\xF6r tillsyn \xF6ver lagen om tillg\xE4nglighet till digital offentlig service. Du kan anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r digitala service har brister i tillg\xE4nglighet.\n\nDu kan ocks\xE5 anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r bed\xF6mning av vad som \xE4r osk\xE4ligt betungande ska granskas, om du tycker att v\xE5r tillg\xE4nglighetsredog\xF6relse har brister eller om du tycker att vi inte har hanterat din beg\xE4ran om tillg\xE4ngligg\xF6rande korrekt." },
|
|
37
|
+
{ id: "technical", title: "Teknisk information om webbplatsens tillg\xE4nglighet", content: "{Den h\xE4r webbplatsen \xE4r helt f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service./Den h\xE4r webbplatsen \xE4r delvis f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service, p\xE5 grund av de brister som beskrivs nedan./Den h\xE4r webbplatsen \xE4r inte f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service. Otillg\xE4ngliga delar beskrivs nedan.}" },
|
|
38
|
+
{ id: "non-accessible", title: "Inneh\xE5ll som inte \xE4r tillg\xE4ngligt", content: "Det inneh\xE5ll som beskrivs nedan \xE4r p\xE5 ett eller annat s\xE4tt inte helt tillg\xE4ngligt.\n\n[\n### Bristande f\xF6renlighet med lagkraven\n{<brister>}\n]" },
|
|
39
|
+
{ id: "testing", title: "Hur vi testat webbplatsen", content: "{Vi har gjort en sj\xE4lvskattning (intern testning) av {<webbplats>}./{<extern akt\xF6r>} har gjort en oberoende granskning av {<webbplats>}./Vi har uppskattat tillg\xE4ngligheten utan granskning.}\n\nSenaste bed\xF6mningen gjordes den {<bed\xF6mningsdatum>}.\n\n[Granskningsmetod: {<metod>}]\n\nWebbplatsen publicerades den {<publiceringsdatum>}.\n\nRedog\xF6relsen uppdaterades senast den {<uppdateringsdatum>}." }
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
en: {
|
|
43
|
+
title: "Accessibility of {<website>}",
|
|
44
|
+
intro: "This website is run by {<organisation>}. We want as many people as possible to be able to use it, and this document describes how {<website>} complies with the accessibility regulations, any known accessibility issues, and how you can report problems so that we can fix them.",
|
|
45
|
+
sections: [
|
|
46
|
+
{ id: "how-accessible", title: "How accessible is the website?", content: "{There are no known accessibility issues with this website./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information.}" },
|
|
47
|
+
{ id: "what-to-do", title: "What to do if you can\u2019t access parts of this website?", content: "If you need content from this website that is not accessible for you, but is not within the scope of the accessibility regulations as described below, please contact us.\n\n[Our normal response time is {<response time>}.]\n\n[You can also contact us in the following ways:\n\n* email {<email address>}\n* call {<telephone number>}]" },
|
|
48
|
+
{ id: "reporting", title: "Reporting accessibility problems with this website", content: "We\u2019re always looking to improve the accessibility of this website. If you find any problems that aren\u2019t listed on this page or if we\u2019re not meeting the requirements of the accessibility regulations, contact us and let us know about the problem." },
|
|
49
|
+
{ id: "enforcement", title: "Enforcement procedure", content: "The {<enforcement_body>} is responsible for enforcing the web accessibility regulations. If you experience accessibility issues on our website, you can submit a complaint to {<enforcement_body>}.\n\nYou can also submit a complaint to {<enforcement_body>} if you think that our assessment of what constitutes a disproportionate burden should be reviewed, if you think that our accessibility statement is inadequate, or it you think that your request for excluded content in an accessible format has not been handled correctly." },
|
|
50
|
+
{ id: "technical", title: "Technical information about this website\u2019s accessibility", content: "{This website is fully compliant with the accessibility regulations./This website is partially compliant with the accessibility regulations, due to the non-compliances listed below./This website is not compliant with the accessibility regulations. The non-accessible sections are listed below.}" },
|
|
51
|
+
{ id: "non-accessible", title: "Non-accessible content", content: "The content described below is, in one way or another, not fully accessible.\n\n[\n### Non-compliance with the accessibility regulations\n\n{<issues>}\n]" },
|
|
52
|
+
{ id: "testing", title: "How we tested this website", content: "{We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}\n\nThe last assessment was made on {<assessment date>}.\n\n[Assessment method: {<method>}]\n\nThe website was published on {<publish date>}.\n\nThe statement was last updated on {<update date>}." }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
no: {
|
|
56
|
+
title: "Tilgjengelighet for {<nettsted>}",
|
|
57
|
+
intro: "{<organisasjon>} st\xE5r bak dette nettstedet. Vi \xF8nsker at flest mulig skal kunne bruke det. Dette dokumentet beskriver hvordan {<nettsted>} oppfyller lov om universell utforming av IKT-l\xF8sninger, eventuelle kjente tilgjengelighetsproblemer og hvordan du kan rapportere mangler til oss slik at vi kan utbedre dem.",
|
|
58
|
+
sections: [
|
|
59
|
+
{ id: "how-accessible", title: "Hvor tilgjengelig er nettstedet?", content: "{Vi har ingen kjente mangler i tilgjengeligheten for dette nettstedet./Vi er klar over at deler av nettstedet ikke er fullt ut tilgjengelig. See avsnittet om innhold som ikke er tilgjengelig nedenfor for mer informasjon./Vi er klar over at deler av nettstedet ikke er fullt ut tilgjengelig. See avsnittet om innhold som ikke er tilgjengelig nedenfor for mer informasjon.}" },
|
|
60
|
+
{ id: "what-to-do", title: "Hva kan du gj\xF8re hvis du ikke kan bruke deler av nettstedet?", content: "Hvis du trenger innhold fra {<nettsted>} som ikke er tilgjengelig for deg, men som er unntatt fra lovens anvendelsesomr\xE5de som beskrevet nedenfor, kan du melde fra til oss.\n\n[Svartiden er normalt {<svartid>}.]\n\n[Du kan ogs\xE5 kontakte oss p\xE5 f\xF8lgende m\xE5ter:\n\n* send e-post til {<e-postadresse>}\n* ring {<telefonnummer>}]" },
|
|
61
|
+
{ id: "reporting", title: "Rapporter mangler ved nettstedets tilgjengelighet", content: "Vi jobber kontinuerlig med \xE5 forbedre nettstedets tilgjengelighet. Hvis du oppdager problemer som ikke er beskrevet p\xE5 denne siden, eller hvis du mener at vi ikke oppfyller lovens krav, meld fra til oss slik at vi f\xE5r vite om problemet." },
|
|
62
|
+
{ id: "enforcement", title: "Tillsyn", content: "{<enforcement_body>} har ansvaret for tilsyn med lov om universell utforming av IKT-l\xF8sninger. Du kan klage til {<enforcement_body>} hvis du mener at v\xE5r digitale tjeneste har mangler i tilgjengelighet.\n\nDu kan ogs\xE5 klage til {<enforcement_body>} hvis du mener at v\xE5r vurdering av hva som er uforholdsmessig byrdefullt b\xF8r overproves, hvis du mener at v\xE5r tilgjengelighetserkl\xE6ring har mangler eller hvis du mener at vi ikke har h\xE5ndtert din foresp\xF8rsel om tilgjengeliggj\xF8ring korrekt." },
|
|
63
|
+
{ id: "technical", title: "Teknisk informasjon om nettstedets tilgjengelighet", content: "{Dette nettstedet er helt i samsvar med lov om universell utforming av IKT-l\xF8sninger./Dette nettstedet er delvis i samsvar med lov om universell utforming av IKT-l\xF8sninger, p\xE5 grunn av manglene beskrevet nedenfor./Dette nettstedet er ikke i samsvar med lov om universell utforming av IKT-l\xF8sninger. Utilgjengelige deler er beskrevet nedenfor.}" },
|
|
64
|
+
{ id: "non-accessible", title: "Innhold som ikke er tilgjengelig", content: "Innholdet som er beskrevet nedenfor er p\xE5 en eller annen m\xE5te ikke fullt ut tilgjengelig.\n\n[\n### Manglende samsvar med lovkravene\n{<mangler>}\n]" },
|
|
65
|
+
{ id: "testing", title: "Hvordan vi har testet nettstedet", content: "{Vi har gjort en egenevaluering (intern testing) av {<nettsted>}./{<ekstern aktor>} har gjort en uavhengig revisjon av {<nettsted>}./Vi har ansl\xE5tt tilgjengeligheten uten testing.}\n\nSiste vurdering ble gjort den {<vurderingsdato>}.\n\n[Vurderingsmetode: {<metode>}]\n\nNettstedet ble publisert den {<publiseringsdato>}.\n\nErkl\xE6ringen ble sist oppdatert den {<oppdateringsdato>}." }
|
|
66
|
+
]
|
|
67
|
+
}
|
|
151
68
|
};
|
|
152
69
|
var formatDiggDate = (date, locale) => {
|
|
153
|
-
|
|
70
|
+
const localeMap = {
|
|
71
|
+
sv: "sv-SE",
|
|
72
|
+
no: "no-NO",
|
|
73
|
+
nb: "no-NO",
|
|
74
|
+
da: "da-DK",
|
|
75
|
+
fi: "fi-FI",
|
|
76
|
+
nl: "nl-NL",
|
|
77
|
+
de: "de-DE",
|
|
78
|
+
fr: "fr-FR",
|
|
79
|
+
es: "es-ES"
|
|
80
|
+
};
|
|
81
|
+
return date.toLocaleDateString(localeMap[locale] || "en-US", {
|
|
154
82
|
year: "numeric",
|
|
155
83
|
month: "long",
|
|
156
84
|
day: "numeric"
|
|
@@ -180,7 +108,7 @@ var AccessibilityStatement = ({
|
|
|
180
108
|
const lang = locale === "sv" ? "sv" : "en";
|
|
181
109
|
const template = TEMPLATES[lang] || TEMPLATES.en;
|
|
182
110
|
const d = (date) => formatDiggDate(date, locale);
|
|
183
|
-
const enforcementBody = ENFORCEMENT_BODIES[country] || ENFORCEMENT_BODIES.EU;
|
|
111
|
+
const enforcementBody = import_standards.ENFORCEMENT_BODIES[country] || import_standards.ENFORCEMENT_BODIES.EU;
|
|
184
112
|
const replacements = {
|
|
185
113
|
"{<webbplats>}": organizationName,
|
|
186
114
|
// Or websiteUrl, but usually org/site name
|
|
@@ -207,12 +135,19 @@ var AccessibilityStatement = ({
|
|
|
207
135
|
};
|
|
208
136
|
let issuesContent = "";
|
|
209
137
|
if (nonComplianceItems.length > 0) {
|
|
210
|
-
issuesContent =
|
|
138
|
+
issuesContent = nonComplianceItems.map((item) => `* ${item}`).join("\n");
|
|
211
139
|
} else {
|
|
212
|
-
issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.";
|
|
140
|
+
issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : lang === "no" ? "Ingen kjente mangler." : "No known issues.";
|
|
213
141
|
}
|
|
214
142
|
replacements["{<brister>}"] = issuesContent;
|
|
215
143
|
replacements["{<issues>}"] = issuesContent;
|
|
144
|
+
replacements["{<mangler>}"] = issuesContent;
|
|
145
|
+
replacements["{<nettsted>}"] = organizationName;
|
|
146
|
+
replacements["{<organisasjon>}"] = organizationName;
|
|
147
|
+
replacements["{<svartid>}"] = responseTime || "";
|
|
148
|
+
replacements["{<vurderingsdato>}"] = assessmentDate ? d(assessmentDate) : d(lastReviewDate);
|
|
149
|
+
replacements["{<publiseringsdatum>}"] = publishDate ? d(publishDate) : "2024-01-01";
|
|
150
|
+
replacements["{<ekstern aktor>}"] = generatorTool?.name || "HolmDigital Engine";
|
|
216
151
|
const renderTemplate = (tmpl) => {
|
|
217
152
|
let text = tmpl;
|
|
218
153
|
text = text.replace(/\[([\s\S]*?)\]/g, (_match, content) => {
|
|
@@ -240,57 +175,59 @@ var AccessibilityStatement = ({
|
|
|
240
175
|
}
|
|
241
176
|
return _match;
|
|
242
177
|
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
178
|
+
return text;
|
|
179
|
+
};
|
|
180
|
+
const renderSections = (sections) => {
|
|
181
|
+
return sections.map((section, i) => {
|
|
182
|
+
const content = renderTemplate(section.content);
|
|
183
|
+
const trimmed = content.trim();
|
|
247
184
|
if (!trimmed) return null;
|
|
248
185
|
let IconNode = null;
|
|
249
|
-
if (trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible")) {
|
|
186
|
+
if (section.id === "how-accessible" || trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible") || trimmed.includes("Hvor tilgjengelig") || trimmed.includes("Hvor tilg\xE6ngeligt") || trimmed.includes("Kuinka saavutettava") || trimmed.includes("Hoe toegankelijk") || trimmed.includes("Stand der Vereinbarkeit") || trimmed.includes("\xC9tat de conformit\xE9") || trimmed.includes("Situaci\xF3n de cumplimiento")) {
|
|
250
187
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EyeIcon, {}) });
|
|
251
|
-
} else if (trimmed.includes("Vad kan du g\xF6ra") || trimmed.includes("What to do")) {
|
|
188
|
+
} else if (section.id === "what-to-do" || trimmed.includes("Vad kan du g\xF6ra") || trimmed.includes("What to do") || trimmed.includes("Hva kan du gj\xF8re") || trimmed.includes("Hvad kan du g\xF8re") || trimmed.includes("Mit\xE4 voit tehd\xE4") || trimmed.includes("Wat kunt u doen") || trimmed.includes("Nicht barrierefreie Inhalte") || trimmed.includes("Contenus non accessibles") || trimmed.includes("Contenido no accesible")) {
|
|
252
189
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HelpCircleIcon, {}) });
|
|
253
|
-
} else if (trimmed.includes("
|
|
190
|
+
} else if (section.id === "reporting" || trimmed.includes("Rapporter brister") || trimmed.includes("Reporting accessibility") || trimmed.includes("Rapporter mangler") || trimmed.includes("Anna palautetta") || trimmed.includes("Meld toegankelijkheidsproblemen") || trimmed.includes("Feedback und Kontaktangaben") || trimmed.includes("Retour d'information") || trimmed.includes("Mecanismo de comunicaci\xF3n")) {
|
|
254
191
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertOctagonIcon, {}) });
|
|
255
|
-
} else if (trimmed.includes("Tillsyn") || trimmed.includes("Enforcement procedure")) {
|
|
192
|
+
} else if (section.id === "enforcement" || trimmed.includes("Tillsyn") || trimmed.includes("Enforcement procedure") || trimmed.includes("Tilsyn") || trimmed.includes("H\xE5ndh\xE6velsesprocedure") || trimmed.includes("T\xE4yt\xE4nt\xF6\xF6npanomenettely") || trimmed.includes("Handhavingsprocedure") || trimmed.includes("Durchsetzungsverfahren") || trimmed.includes("Voies de recours") || trimmed.includes("Procedimiento de aplicaci\xF3n")) {
|
|
256
193
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GavelIcon, {}) });
|
|
257
|
-
} else if (trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
|
|
194
|
+
} else if (section.id === "technical" || trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
|
|
258
195
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CpuIcon, {}) });
|
|
259
|
-
} else if (trimmed.includes("Hur vi testat") || trimmed.includes("How we tested")) {
|
|
196
|
+
} else if (section.id === "testing" || trimmed.includes("Hur vi testat") || trimmed.includes("How we tested") || trimmed.includes("Hvordan vi har testet") || trimmed.includes("Kuinka olemme testanneet") || trimmed.includes("Hoe wij de website hebben getest") || trimmed.includes("Erstellung dieser Erkl\xE4rung") || trimmed.includes("\xC9tablissement de cette d\xE9claration") || trimmed.includes("Preparaci\xF3n de la presente declaraci\xF3n")) {
|
|
260
197
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckCircleIcon, {}) });
|
|
261
198
|
}
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
title
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
199
|
+
const blocks = trimmed.split("\n\n").map((block, bi) => {
|
|
200
|
+
const blockTrimmed = block.trim();
|
|
201
|
+
if (!blockTrimmed) return null;
|
|
202
|
+
if (blockTrimmed.startsWith("## ")) {
|
|
203
|
+
const title = blockTrimmed.replace("## ", "");
|
|
204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h2", { style: styles.sectionTitle, children: [
|
|
205
|
+
IconNode,
|
|
206
|
+
title
|
|
207
|
+
] }, `${i}-${bi}`);
|
|
208
|
+
}
|
|
209
|
+
if (blockTrimmed.startsWith("### ")) {
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: blockTrimmed.replace("### ", "") }, `${i}-${bi}`);
|
|
211
|
+
}
|
|
212
|
+
if (blockTrimmed.includes("* ") || blockTrimmed.includes("\u2022 ")) {
|
|
213
|
+
const lines = blockTrimmed.split("\n");
|
|
214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
|
|
215
|
+
const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
|
|
216
|
+
if (!cleanLine) return null;
|
|
217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { style: styles.listItem, children: [
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.listBullet }),
|
|
219
|
+
cleanLine
|
|
220
|
+
] }, li);
|
|
221
|
+
}) }, `${i}-${bi}`);
|
|
222
|
+
}
|
|
223
|
+
const isCardSection = blockTrimmed.includes("e-post") || blockTrimmed.includes("email") || blockTrimmed.includes("ring ") || blockTrimmed.includes("call ");
|
|
224
|
+
if (isCardSection) {
|
|
225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.card, children: blockTrimmed }, `${i}-${bi}`);
|
|
226
|
+
}
|
|
227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.paragraph, children: blockTrimmed }, `${i}-${bi}`);
|
|
228
|
+
});
|
|
229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { style: styles.section, children: blocks }, i);
|
|
292
230
|
});
|
|
293
|
-
return sectionNodes;
|
|
294
231
|
};
|
|
295
232
|
const statementTools = (0, import_standards.getStatementToolsByCountry)(country);
|
|
296
233
|
const usedTool = generatorTool || statementTools.find((t) => t.recommended) || statementTools[0];
|
|
@@ -525,16 +462,11 @@ var AccessibilityStatement = ({
|
|
|
525
462
|
] }),
|
|
526
463
|
badgeUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: badgeUrl, alt: "Accessibility Badge", style: { height: "1.5rem", width: "auto" } }) })
|
|
527
464
|
] }),
|
|
528
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
534
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: title }),
|
|
535
|
-
renderTemplate(bodyRaw)
|
|
536
|
-
] });
|
|
537
|
-
})() }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "statement-content", children: [
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: renderTemplate(template.title) }),
|
|
467
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.paragraph, children: renderTemplate(template.intro) }),
|
|
468
|
+
renderSections(template.sections)
|
|
469
|
+
] }),
|
|
538
470
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("footer", { style: { marginTop: "3rem", borderTop: "1px solid #e2e8f0", paddingTop: "1.5rem", fontSize: "0.875rem", color: "#64748b" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
539
471
|
lang === "sv" ? "Genererad med hj\xE4lp av" : "Generated using",
|
|
540
472
|
" ",
|