@holmdigital/components 2.0.0 → 2.1.1

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.
@@ -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: `Tillg\xE4nglighet f\xF6r {<webbplats>}
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
- ## Hur tillg\xE4nglig \xE4r webbplatsen?
49
-
50
- {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.}
51
-
52
- ## Vad kan du g\xF6ra om du inte kan anv\xE4nda delar av webbplatsen?
53
-
54
- 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.
55
-
56
- [Svarstiden \xE4r normalt {<svarstid>}.]
57
-
58
- [Du kan ocks\xE5 kontakta oss p\xE5 f\xF6ljande s\xE4tt:
59
-
60
- * skicka e-post till {<e-postadress>}
61
- * ring {<telefonnummer>}]
62
-
63
- ## Rapportera brister i webbplatsens tillg\xE4nglighet
64
-
65
- 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.
66
-
67
- ## Tillsyn
68
-
69
- {<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.
70
-
71
- Du 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.
72
-
73
- ## Teknisk information om webbplatsens tillg\xE4nglighet
74
-
75
- {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.}
76
-
77
- ## Inneh\xE5ll som inte \xE4r tillg\xE4ngligt
78
-
79
- Det inneh\xE5ll som beskrivs nedan \xE4r p\xE5 ett eller annat s\xE4tt inte helt tillg\xE4ngligt.
80
-
81
- [
82
- ### Bristande f\xF6renlighet med lagkraven
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
- return date.toLocaleDateString(locale === "sv" ? "sv-SE" : "en-US", {
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"
@@ -177,10 +105,11 @@ var AccessibilityStatement = ({
177
105
  badgeUrl,
178
106
  publishDate
179
107
  }) => {
180
- const lang = locale === "sv" ? "sv" : "en";
108
+ const supportedLocales = { sv: "sv", no: "no", nb: "no" };
109
+ const lang = supportedLocales[locale] ?? "en";
181
110
  const template = TEMPLATES[lang] || TEMPLATES.en;
182
111
  const d = (date) => formatDiggDate(date, locale);
183
- const enforcementBody = ENFORCEMENT_BODIES[country] || ENFORCEMENT_BODIES.EU;
112
+ const enforcementBody = import_standards.ENFORCEMENT_BODIES[country] || import_standards.ENFORCEMENT_BODIES.EU;
184
113
  const replacements = {
185
114
  "{<webbplats>}": organizationName,
186
115
  // Or websiteUrl, but usually org/site name
@@ -207,12 +136,19 @@ var AccessibilityStatement = ({
207
136
  };
208
137
  let issuesContent = "";
209
138
  if (nonComplianceItems.length > 0) {
210
- issuesContent = "\n\n" + nonComplianceItems.map((item) => `* ${item}`).join("\n");
139
+ issuesContent = nonComplianceItems.map((item) => `* ${item}`).join("\n");
211
140
  } else {
212
- issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.";
141
+ issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : lang === "no" ? "Ingen kjente mangler." : "No known issues.";
213
142
  }
214
143
  replacements["{<brister>}"] = issuesContent;
215
144
  replacements["{<issues>}"] = issuesContent;
145
+ replacements["{<mangler>}"] = issuesContent;
146
+ replacements["{<nettsted>}"] = organizationName;
147
+ replacements["{<organisasjon>}"] = organizationName;
148
+ replacements["{<svartid>}"] = responseTime || "";
149
+ replacements["{<vurderingsdato>}"] = assessmentDate ? d(assessmentDate) : d(lastReviewDate);
150
+ replacements["{<publiseringsdatum>}"] = publishDate ? d(publishDate) : "2024-01-01";
151
+ replacements["{<ekstern aktor>}"] = generatorTool?.name || "HolmDigital Engine";
216
152
  const renderTemplate = (tmpl) => {
217
153
  let text = tmpl;
218
154
  text = text.replace(/\[([\s\S]*?)\]/g, (_match, content) => {
@@ -240,57 +176,63 @@ var AccessibilityStatement = ({
240
176
  }
241
177
  return _match;
242
178
  });
243
- text = text.replace(/\r\n/g, "\n");
244
- const sections = text.split("\n\n");
245
- const sectionNodes = sections.map((block, i) => {
246
- const trimmed = block.trim();
179
+ return text;
180
+ };
181
+ const renderSections = (sections) => {
182
+ return sections.map((section, i) => {
183
+ const content = renderTemplate(section.content);
184
+ const trimmed = content.trim();
247
185
  if (!trimmed) return null;
248
186
  let IconNode = null;
249
- if (trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible")) {
187
+ 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
188
  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")) {
189
+ } 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
190
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HelpCircleIcon, {}) });
253
- } else if (trimmed.includes("Rapportera brister") || trimmed.includes("Reporting accessibility")) {
191
+ } 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
192
  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")) {
193
+ } 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
194
  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")) {
195
+ } else if (section.id === "technical" || trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
258
196
  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")) {
197
+ } 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
198
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckCircleIcon, {}) });
261
199
  }
262
- if (trimmed.startsWith("## ")) {
263
- const title = trimmed.replace("## ", "");
264
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h2", { style: styles.sectionTitle, children: [
265
- IconNode,
266
- title
267
- ] }, i);
268
- }
269
- if (trimmed.startsWith("### ")) {
270
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: trimmed.replace("### ", "") }, i);
271
- }
272
- if (trimmed.includes("* ") || trimmed.includes("\u2022 ")) {
273
- const lines = trimmed.split("\n");
274
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
275
- const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
276
- if (!cleanLine) return null;
277
- const isListItem = line.trim().startsWith("*") || line.trim().startsWith("\u2022") || line.trim().startsWith("-");
278
- if (!isListItem) {
279
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.paragraph, children: line }, `p-${li}`);
280
- }
281
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { style: styles.listItem, children: [
282
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.listBullet }),
283
- cleanLine
284
- ] }, li);
285
- }) }, i);
286
- }
287
- const isCardSection = trimmed.includes("e-post") || trimmed.includes("email") || trimmed.includes("ring ") || trimmed.includes("call ");
288
- if (isCardSection) {
289
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.card, children: trimmed }, i);
290
- }
291
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.paragraph, children: trimmed }, i);
200
+ const SectionHeader = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h2", { style: styles.sectionTitle, children: [
201
+ IconNode,
202
+ section.title
203
+ ] }, `h2-${i}`);
204
+ const blocks = trimmed.split("\n\n").map((block, bi) => {
205
+ const blockTrimmed = block.trim();
206
+ if (!blockTrimmed) return null;
207
+ if (blockTrimmed.startsWith("## ")) {
208
+ const title = blockTrimmed.replace("## ", "");
209
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { style: styles.sectionTitle, children: title }, `${i}-${bi}`);
210
+ }
211
+ if (blockTrimmed.startsWith("### ")) {
212
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: blockTrimmed.replace("### ", "") }, `${i}-${bi}`);
213
+ }
214
+ if (blockTrimmed.includes("* ") || blockTrimmed.includes("\u2022 ")) {
215
+ const lines = blockTrimmed.split("\n");
216
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
217
+ const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
218
+ if (!cleanLine) return null;
219
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { style: styles.listItem, children: [
220
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.listBullet }),
221
+ cleanLine
222
+ ] }, li);
223
+ }) }, `${i}-${bi}`);
224
+ }
225
+ const isCardSection = blockTrimmed.includes("e-post") || blockTrimmed.includes("email") || blockTrimmed.includes("ring ") || blockTrimmed.includes("call ");
226
+ if (isCardSection) {
227
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.card, children: blockTrimmed }, `${i}-${bi}`);
228
+ }
229
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.paragraph, children: blockTrimmed }, `${i}-${bi}`);
230
+ });
231
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { style: styles.section, children: [
232
+ SectionHeader,
233
+ blocks
234
+ ] }, i);
292
235
  });
293
- return sectionNodes;
294
236
  };
295
237
  const statementTools = (0, import_standards.getStatementToolsByCountry)(country);
296
238
  const usedTool = generatorTool || statementTools.find((t) => t.recommended) || statementTools[0];
@@ -306,152 +248,168 @@ var AccessibilityStatement = ({
306
248
  display: "flex",
307
249
  justifyContent: "space-between",
308
250
  alignItems: "center",
309
- marginBottom: "4.5rem",
310
- paddingBottom: "2rem",
311
- borderBottom: "1px solid #f1f5f9"
251
+ marginBottom: "5rem",
252
+ paddingBottom: "2.5rem",
253
+ borderBottom: "1px solid #f8fafc"
312
254
  },
313
255
  logoContainer: {
314
256
  display: "flex",
315
257
  alignItems: "center",
316
258
  textDecoration: "none",
317
- marginRight: "1.5rem"
259
+ marginRight: "2rem"
318
260
  },
319
261
  divider: {
320
- height: "2.5rem",
262
+ height: "2rem",
321
263
  width: "1px",
322
264
  backgroundColor: "#e2e8f0",
323
- marginRight: "1.5rem",
265
+ marginRight: "2rem",
324
266
  display: "block"
325
267
  },
326
268
  websiteContainer: {
327
269
  display: "flex",
328
270
  alignItems: "center",
329
- gap: "0.75rem",
271
+ gap: "0.625rem",
330
272
  textDecoration: "none",
331
- color: "#475569",
332
- // Slate 600
333
- fontWeight: 600,
334
- fontSize: "1rem",
273
+ color: "#64748b",
274
+ // Slate 500
275
+ fontWeight: 500,
276
+ fontSize: "0.925rem",
335
277
  padding: "0.5rem 1rem",
336
278
  backgroundColor: "#f8fafc",
337
- borderRadius: "0.75rem",
279
+ borderRadius: "100px",
338
280
  border: "1px solid #f1f5f9"
339
281
  },
340
282
  container: {
341
- maxWidth: "900px",
342
- margin: "2rem auto",
343
- padding: "4.5rem",
283
+ maxWidth: "1000px",
284
+ margin: "4rem auto",
285
+ padding: "6rem",
344
286
  backgroundColor: "#ffffff",
345
- borderRadius: "24px",
346
- boxShadow: "0 25px 50px -12px rgb(0 0 0 / 0.05)",
287
+ borderRadius: "32px",
288
+ boxShadow: "0 40px 100px -20px rgba(15, 23, 42, 0.08)",
347
289
  border: "1px solid #f1f5f9",
348
290
  fontFamily: '"Inter", system-ui, -apple-system, sans-serif',
349
291
  color: "#1e293b",
350
292
  // Slate 800
351
- lineHeight: 1.75,
352
- fontSize: "1.125rem"
293
+ lineHeight: 1.8,
294
+ fontSize: "1.125rem",
295
+ position: "relative",
296
+ overflow: "hidden"
353
297
  },
354
298
  mainHeading: {
355
- fontSize: "3rem",
356
- fontWeight: 900,
357
- color: "#082f49",
358
- // Primary 950
299
+ fontSize: "3.5rem",
300
+ fontWeight: 800,
301
+ color: "#0f172a",
302
+ // Slate 900
359
303
  marginTop: "0",
360
- marginBottom: "1rem",
361
- letterSpacing: "-0.04em",
362
- lineHeight: 1.1
304
+ marginBottom: "1.5rem",
305
+ letterSpacing: "-0.05em",
306
+ lineHeight: 1.05
363
307
  },
364
308
  metaData: {
365
309
  color: "#64748b",
366
310
  // Slate 500
367
311
  fontSize: "0.925rem",
368
- marginBottom: "4rem",
312
+ marginBottom: "5rem",
369
313
  fontWeight: 500,
370
314
  display: "flex",
371
- gap: "1.5rem"
315
+ gap: "2rem",
316
+ padding: "1.25rem 2rem",
317
+ backgroundColor: "#f8fafc",
318
+ borderRadius: "1rem",
319
+ border: "1px solid #f1f5f9",
320
+ width: "fit-content"
372
321
  },
373
322
  section: {
374
- marginBottom: "4.5rem"
323
+ marginBottom: "6rem"
375
324
  },
376
325
  sectionTitle: {
377
- fontSize: "1.75rem",
378
- fontWeight: 800,
379
- color: "#082f49",
380
- // Primary 950
381
- marginBottom: "1.5rem",
326
+ fontSize: "1.875rem",
327
+ fontWeight: 700,
328
+ color: "#0f172a",
329
+ marginBottom: "2rem",
382
330
  marginTop: 0,
383
- letterSpacing: "-0.025em",
331
+ letterSpacing: "-0.03em",
384
332
  display: "flex",
385
333
  alignItems: "center",
386
- gap: "0.75rem"
334
+ gap: "1rem"
387
335
  },
388
336
  card: {
389
337
  padding: "2.5rem",
390
- backgroundColor: "#f0f9ff",
391
- // Primary 50
338
+ backgroundColor: "#ffffff",
392
339
  borderRadius: "1.5rem",
393
- border: "1px solid #e0f2fe",
394
- marginBottom: "2.5rem"
340
+ border: "1px solid #f1f5f9",
341
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.02)",
342
+ marginBottom: "2.5rem",
343
+ display: "flex",
344
+ flexDirection: "column",
345
+ gap: "1rem"
395
346
  },
396
347
  paragraph: {
397
- marginBottom: "1.5rem",
398
- maxWidth: "65ch",
399
- whiteSpace: "pre-line"
348
+ marginBottom: "1.75rem",
349
+ maxWidth: "70ch",
350
+ whiteSpace: "pre-line",
351
+ color: "#475569"
352
+ // Slate 600
400
353
  },
401
354
  link: {
402
- color: "#0284c7",
403
- // Primary 600
355
+ color: "#0ea5e9",
356
+ // Primary 500
404
357
  textDecoration: "none",
405
358
  fontWeight: 600,
406
- borderBottom: "2px solid #e0f2fe",
407
- transition: "border-color 0.2s",
359
+ borderBottom: "1.5px solid rgba(14, 165, 233, 0.2)",
360
+ transition: "all 0.2s",
408
361
  cursor: "pointer"
409
362
  },
410
363
  list: {
411
364
  listStyleType: "none",
412
365
  paddingLeft: 0,
413
- marginBottom: "1.5rem"
366
+ marginBottom: "2rem",
367
+ display: "flex",
368
+ flexDirection: "column",
369
+ gap: "1rem"
414
370
  },
415
371
  listItem: {
416
- marginBottom: "0.75rem",
417
- paddingLeft: "1.75rem",
372
+ padding: "1.25rem 1.75rem 1.25rem 3.5rem",
418
373
  position: "relative",
419
- display: "block"
374
+ backgroundColor: "#f8fafc",
375
+ borderRadius: "1rem",
376
+ border: "1px solid #f1f5f9",
377
+ fontSize: "1rem",
378
+ color: "#334155"
420
379
  },
421
380
  listBullet: {
422
381
  position: "absolute",
423
- left: 0,
424
- top: "0.6em",
425
- width: "0.5rem",
426
- height: "0.5rem",
427
- borderRadius: "50%",
428
- backgroundColor: "#0ea5e9"
429
- // Primary 500
382
+ left: "1.5rem",
383
+ top: "50%",
384
+ transform: "translateY(-50%)",
385
+ width: "0.75rem",
386
+ height: "0.75rem",
387
+ borderRadius: "4px",
388
+ backgroundColor: "#0ea5e9",
389
+ opacity: 0.8
430
390
  },
431
391
  statusBadge: {
432
392
  display: "inline-flex",
433
393
  alignItems: "center",
434
- padding: "0.375rem 1rem",
435
- borderRadius: "9999px",
394
+ padding: "0.5rem 1.25rem",
395
+ borderRadius: "100px",
436
396
  fontSize: "0.875rem",
437
- fontWeight: 700,
438
- backgroundColor: complianceLevel === "full" ? "#dcfce7" : complianceLevel === "partial" ? "#fef9c3" : "#fee2e2",
439
- color: complianceLevel === "full" ? "#166534" : complianceLevel === "partial" ? "#854d0e" : "#991b1b",
440
- boxShadow: `0 4px 6px -1px ${complianceLevel === "full" ? "rgba(34, 197, 94, 0.1)" : complianceLevel === "partial" ? "rgba(234, 179, 8, 0.1)" : "rgba(239, 68, 68, 0.1)"}`,
441
- border: `1px solid ${complianceLevel === "full" ? "#bbf7d0" : complianceLevel === "partial" ? "#fef08a" : "#fecaca"}`,
442
- marginLeft: "0.5rem"
397
+ fontWeight: 600,
398
+ backgroundColor: complianceLevel === "full" ? "#f0fdf4" : complianceLevel === "partial" ? "#fffbeb" : "#fef2f2",
399
+ color: complianceLevel === "full" ? "#166534" : complianceLevel === "partial" ? "#92400e" : "#991b1b",
400
+ border: `1px solid ${complianceLevel === "full" ? "#dcfce7" : complianceLevel === "partial" ? "#fef3c7" : "#fee2e2"}`,
401
+ letterSpacing: "0.01em"
443
402
  },
444
403
  iconWrapper: {
445
404
  display: "flex",
446
405
  alignItems: "center",
447
406
  justifyContent: "center",
448
- width: "2.5rem",
449
- height: "2.5rem",
450
- borderRadius: "0.75rem",
451
- backgroundColor: "#ffffff",
452
- boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
407
+ width: "2.75rem",
408
+ height: "2.75rem",
409
+ borderRadius: "12px",
410
+ backgroundColor: "#f8fafc",
453
411
  border: "1px solid #f1f5f9",
454
- color: "#0284c7"
412
+ color: "#0ea5e9"
455
413
  }
456
414
  };
457
415
  const Logo = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
@@ -525,16 +483,26 @@ var AccessibilityStatement = ({
525
483
  ] }),
526
484
  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
485
  ] }),
528
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "statement-content", children: (() => {
529
- const parts = template.split("\n");
530
- const titleRaw = parts[0];
531
- const bodyRaw = parts.slice(1).join("\n");
532
- let title = titleRaw.replace("{<webbplats>}", organizationName).replace("{<website>}", organizationName);
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
- })() }),
486
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "statement-content", children: [
487
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { style: { marginBottom: "4rem" }, children: [
488
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: renderTemplate(template.title) }),
489
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles.metaData, children: [
490
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
491
+ lang === "sv" ? "Status:" : "Status:",
492
+ " ",
493
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: styles.statusBadge, children: complianceLevel === "full" ? lang === "sv" ? "Fullt f\xF6renlig" : "Fully compliant" : complianceLevel === "partial" ? lang === "sv" ? "Delvis f\xF6renlig" : "Partially compliant" : lang === "sv" ? "Ej f\xF6renlig" : "Non-compliant" })
494
+ ] }),
495
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#e2e8f0" }, children: "|" }),
496
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
497
+ lang === "sv" ? "Uppdaterad:" : "Updated:",
498
+ " ",
499
+ d(lastReviewDate)
500
+ ] })
501
+ ] })
502
+ ] }),
503
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { ...styles.paragraph, fontSize: "1.25rem", color: "#1e293b", fontWeight: 500, marginBottom: "4rem" }, children: renderTemplate(template.intro) }),
504
+ renderSections(template.sections)
505
+ ] }),
538
506
  /* @__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
507
  lang === "sv" ? "Genererad med hj\xE4lp av" : "Generated using",
540
508
  " ",