hof 19.11.24 → 19.12.2

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 CHANGED
@@ -5,6 +5,11 @@
5
5
 
6
6
  HOF (Home Office Forms) is a framework designed to assist developers in creating form-based workflows in a rapid, repeatable and secure way. It aims to reduce simple applications as much as possible to being configuration-only.
7
7
 
8
+ ## Server Settings
9
+ In your `hof.settings.json` file you can add `getTerms: false` and `getCookies: false` to turn off the default cookies, and terms and conditions information provided by the HOF framework. This is if you want to provide more specific material at the service level in regards to these subject matter otherwise the defaults should suffice.
10
+
11
+ Also you can set `getAccessibility: true` to get the default accessibility document for this framework if one is not provided at the service level. It is assumed there should have been an accessibility audit carried out for a service already hence why the default setting for this is set to `false`. But if a generic placeholder is needed to ensure the service is legally compliant then this can be set to `true` to provide the default one presented within the framework.
12
+
8
13
  ## Resources
9
14
 
10
15
  ### HOF documentation
@@ -3,6 +3,7 @@
3
3
 
4
4
  const defaults = {
5
5
  appName: process.env.APP_NAME || 'HOF Application',
6
+ htmlLang: 'en',
6
7
  root: process.cwd(),
7
8
  translations: 'translations',
8
9
  start: true,
@@ -11,6 +12,7 @@ const defaults = {
11
12
  },
12
13
  getCookies: true,
13
14
  getTerms: true,
15
+ getAccessibility: false,
14
16
  viewEngine: 'html',
15
17
  protocol: process.env.PROTOCOL || 'http',
16
18
  noCache: process.env.NO_CACHE || false,
@@ -0,0 +1,43 @@
1
+ {
2
+ "header": "Accessibility statement for this Home Office Forms Application",
3
+ "intro": "This accessibility statement applies to the 'Apply for a refugee integration loan' and 'Accepting your integration loan' services.",
4
+ "intro-p2": "This website is run by the Home Office. We want as many people as possible to be able to use this website. For example, that means you should be able to:",
5
+ "intro-p2-li1": "change colours, contrast levels and fonts",
6
+ "intro-p2-li2": "zoom in up to 300% without the text spilling off the screen",
7
+ "intro-p2-li3": "navigate most of the website using just a keyboard",
8
+ "intro-p2-li4": "navigate most of the website using speech recognition software",
9
+ "intro-p2-li5": "listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and VoiceOver)",
10
+ "intro-p3-pre-link": "We've also made the website text as simple as possible to understand.",
11
+ "intro-p3-link": "AbilityNet",
12
+ "intro-p3-post-link": "has advice on making your device easier to use if you have a disability.",
13
+ "how-accessible-header": "How accessible this website is",
14
+ "how-accessible-p1": "We know some parts of this website are not fully accessible",
15
+ "how-accessible-p1-li1": "some tables do not fit on the screen when zooming in",
16
+ "how-accessible-p1-li2": "session timeout cannot be changed",
17
+ "contact-email-operations": "integrationloan@homeoffice.gov.uk",
18
+ "contact-email-accessibility": "hof-accessibility@digital.homeoffice.gov.uk",
19
+ "reporting-header": "Reporting accessibility problems with this website",
20
+ "reporting-p1": "We're always looking to improve the accessibility of this website. If you find any problems not listed on this page or think we're not meeting accessibility requirements, contact:",
21
+ "reporting-p1-li1-pre-link": "Email:",
22
+ "reporting-p2-link": "Read tips on contacting organisations about inaccessible websites.",
23
+ "enforcement-header": "Enforcement procedure",
24
+ "enforcement-p1-pre-link": "The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the 'accessibility regulations'). If you're not happy with how we respond to your complaint,",
25
+ "enforcement-p1-link": "contact the Equality Advisory and Support Service (EASS).",
26
+ "enforcement-p2": "If you are in Northern Ireland and are not happy with how we respond to your complaint you can contact the Equalities Commission for Northern Ireland who are responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018(the 'accessibility regulations') in Northern Ireland.",
27
+ "technical-info-header": "Technical information about this website's accessibility",
28
+ "technical-info-p1": "The Home Office is committed to making its website accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.",
29
+ "compliance-header": "Compliance status",
30
+ "compliance-p1": "This website is partially compliant with the <a href='https://www.w3.org/TR/WCAG21/'>Web Content Accessibility Guidelines version 2.1</a> AA standard, due to the non-compliances listed below.",
31
+ "non-accessible-header": "Non-accessible Content",
32
+ "non-accessible-p1": "The content listed below is non-accessible for the following reasons.",
33
+ "non-compliance-header": "Non-compliance with the accessibility regulations",
34
+ "non-compliance-li1": "The session timeout of 30 minutes cannot be changed and the user is not alerted when it is running out. This for each individual page of the form, not the form overall. This does not meet WCAG 2.2 Enough Time.",
35
+ "disproportionate-burden-header": "Disproportionate burden",
36
+ "disproportionate-burden-p1": "At this time, we have not made any disproportionate burden claims.",
37
+ "outside-scope-header": "Content that's not within the scope of the accessibility regulations",
38
+ "outside-scope-p1": "At this time, this service does not contain any content that is exempt from the regulations.",
39
+ "preparation-header": "Preparation of this accessibility statement",
40
+ "preparation-p1": "This statement was prepared on 1 June 2020. It was last reviewed on 14 January 2022.",
41
+ "preparation-p2": "This website was last tested on 13 August 2021. The test was carried out internally by the Home Office.",
42
+ "preparation-p3": "We tested the service based on a user's ability to complete key journeys. All parts of the chosen journeys were tested, including documents. Journeys were chosen on a number of factors including usage statistics, risk assessments and subject matter."
43
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "terms": "Terms and conditions",
3
- "cookies": "Cookies"
3
+ "cookies": "Cookies",
4
+ "accessibility": "Accessibility statement"
4
5
  }
@@ -0,0 +1,55 @@
1
+ {{<layout}}
2
+
3
+ {{$propositionHeader}}{{/propositionHeader}}
4
+
5
+ {{$header}}
6
+ {{header}}
7
+ {{/header}}
8
+
9
+ {{$content}}
10
+ <p class="govuk-body">{{#t}}accessibility.intro-p2{{/t}}</p>
11
+ <ul class="list list-bullet">
12
+ <li>{{#t}}accessibility.intro-p2-li1{{/t}}</li>
13
+ <li>{{#t}}accessibility.intro-p2-li2{{/t}}</li>
14
+ <li>{{#t}}accessibility.intro-p2-li3{{/t}}</li>
15
+ <li>{{#t}}accessibility.intro-p2-li4{{/t}}</li>
16
+ <li>{{#t}}accessibility.intro-p2-li5{{/t}}</li>
17
+ </ul>
18
+ <p class="govuk-body">{{#t}}accessibility.intro-p3-pre-link{{/t}} <a href="https://mcmw.abilitynet.org.uk/">{{#t}}accessibility.intro-p3-link{{/t}}</a> {{#t}}accessibility.intro-p3-post-link{{/t}}</p>
19
+ <h2 class="govuk-heading-m">{{#t}}accessibility.how-accessible-header{{/t}}</h2>
20
+ <p class="govuk-body">{{#t}}accessibility.how-accessible-p1{{/t}}</p>
21
+ <ul class="list list-bullet">
22
+ <li>{{#t}}accessibility.how-accessible-p1-li1{{/t}}</li>
23
+ <li>{{#t}}accessibility.how-accessible-p1-li2{{/t}}</li>
24
+ </ul>
25
+ <h2 class="govuk-heading-m">{{#t}}accessibility.reporting-header{{/t}}</h2>
26
+ <p class="govuk-body">{{#t}}accessibility.reporting-p1{{/t}}</p>
27
+ <ul class="list list-bullet">
28
+ <li>{{#t}}accessibility.reporting-p1-li1-pre-link{{/t}} <a href="mailto:{{#t}}accessibility.contact-email-accessibility{{/t}}">{{#t}}accessibility.contact-email-accessibility{{/t}}</a></li>
29
+ </ul>
30
+ <p class="govuk-body">
31
+ <a href="http://www.w3.org/WAI/users/inaccessible">{{#t}}accessibility.reporting-p2-link{{/t}}</a>
32
+ </p>
33
+ <h2 class="govuk-heading-m">{{#t}}accessibility.enforcement-header{{/t}}</h2>
34
+ <p class="govuk-body">{{#t}}accessibility.enforcement-p1-pre-link{{/t}} <a href ="https://www.equalityadvisoryservice.com/">{{#t}}accessibility.enforcement-p1-link{{/t}}</a></p>
35
+ <p class="govuk-body">{{#t}}accessibility.enforcement-p2{{/t}}</p>
36
+ <h2 class="govuk-heading-m">{{#t}}accessibility.technical-info-header{{/t}}</h2>
37
+ <p class="govuk-body">{{#t}}accessibility.technical-info-p1{{/t}}</p>
38
+ <h2 class="govuk-heading-m">{{#t}}accessibility.compliance-header{{/t}}</h2>
39
+ <p class="govuk-body">{{#t}}accessibility.compliance-p1{{/t}}</p>
40
+ <h2 class="govuk-heading-m">{{#t}}accessibility.non-accessible-header{{/t}}</h2>
41
+ <p class="govuk-body">{{#t}}accessibility.non-accessible-p1{{/t}}</p>
42
+ <h3 class="govuk-heading-m">{{#t}}accessibility.non-compliance-header{{/t}}</h3>
43
+ <ul class="list list-bullet">
44
+ <li>{{#t}}accessibility.non-compliance-li1{{/t}}</li>
45
+ </ul>
46
+ <h3 class="govuk-heading-m">{{#t}}accessibility.disproportionate-burden-header{{/t}}</h3>
47
+ <p class="govuk-body">{{#t}}accessibility.disproportionate-burden-p1{{/t}}</p>
48
+ <h3 class="govuk-heading-m">{{#t}}accessibility.outside-scope-header{{/t}}</h3>
49
+ <p class="govuk-body">{{#t}}accessibility.outside-scope-p1{{/t}}</p>
50
+ <h2 class="govuk-heading-m">{{#t}}accessibility.preparation-header{{/t}}</h2>
51
+ <p class="govuk-body">{{#t}}accessibility.preparation-p1{{/t}}</p>
52
+ <p class="govuk-body">{{#t}}accessibility.preparation-p2{{/t}}</p>
53
+ <p class="govuk-body">{{#t}}accessibility.preparation-p3{{/t}}</p>
54
+ {{/content}}
55
+ {{/layout}}
@@ -44,6 +44,7 @@
44
44
  {{^footerSupportLinks}}
45
45
  <li><a href="/cookies">{{#t}}base.cookies{{/t}}</a></li>
46
46
  <li><a href="/terms-and-conditions">{{#t}}base.terms{{/t}}</a></li>
47
+ <li><a href="/accessibility">{{#t}}base.accessibility{{/t}}</a></li>
47
48
  {{/footerSupportLinks}}
48
49
  </ul>
49
50
  {{/footerSupportLinks}}
package/index.js CHANGED
@@ -135,6 +135,7 @@ function bootstrap(options) {
135
135
  app.use((req, res, next) => {
136
136
  res.locals.nonce = crypto.randomBytes(16).toString('hex');
137
137
  res.locals.appName = config.appName;
138
+ res.locals.htmlLang = config.htmlLang;
138
139
  res.locals.cookieName = config.session.name;
139
140
  next();
140
141
  });
@@ -204,6 +205,16 @@ function bootstrap(options) {
204
205
  app.use(mixins());
205
206
  app.use(markdown(config.markdown));
206
207
 
208
+ if (config.getAccessibility === true) {
209
+ deprecate(
210
+ '`getAccessibility` option is deprecated and may be removed in future versions.',
211
+ 'Use `pages` to define static cookies page.'
212
+ );
213
+ app.get('/accessibility', (req, res) => {
214
+ const locals = Object.assign({}, req.translate('accessibility'));
215
+ res.render('accessibility', locals);
216
+ });
217
+ }
207
218
  if (config.getCookies === true) {
208
219
  deprecate(
209
220
  '`getCookies` option is deprecated and may be removed in future versions.',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "19.11.24",
4
+ "version": "19.12.2",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -55,7 +55,7 @@
55
55
  "express-partial-templates": "^0.2.0",
56
56
  "express-session": "^1.13.0",
57
57
  "findup": "^0.1.5",
58
- "glob": "^7.1.7",
58
+ "glob": "^7.2.0",
59
59
  "govuk-elements-sass": "^3.1.3",
60
60
  "govuk_template_mustache": "^0.26.0",
61
61
  "helmet": "^3.22.0",