diff --git a/sonar-project.properties b/sonar-project.properties index 1376c39d4..0af8c3f2d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,11 @@ sonar.sources=src/app sonar.tests=src/app sonar.test.inclusions=**.spec.ts,**.test.js sonar.host.url=https://sonarcloud.io/ -sonar.exclusions=src/app/components/cookie-banner/*,**/feature.edit.component.ts,**.mock.ts,**.mock.js,**/roles.ts,**/app.module.ts,**/app.component.ts,**/auth.dev.interceptor.ts,**/app-routing.module.ts,**/test-utils/** +sonar.exclusions=src/app/shared/components/footer/*,src/components/accessibility-statement/*,src/app/components/accessibility-statement/*,src/app/components/cookie-banner/*,**/feature.edit.component.ts,**.mock.ts,**.mock.js,**/roles.ts,**/app.module.ts,**/app.component.ts,**/auth.dev.interceptor.ts,**/app-routing.module.ts,**/test-utils/** + + + + sonar.ts.coverage.lcovReportPath=coverage/ccpay-bubble/lcov-angular.info sonar.javascript.lcov.reportPaths=coverage/ccpay-bubble/lcov-angular.info diff --git a/src/app/app.component.html b/src/app/app.component.html index abb81d79a..5b47671fe 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -17,18 +17,5 @@ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6caccfab0..e0ec49f0e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -39,6 +39,8 @@ import { CookieDetailsComponent } from './components/cookie-details/cookie-detai import { windowProvider, windowToken } from '../window'; import { CookieTableComponent } from './components/cookie-table/cookie-table.component'; import { RpxTranslationModule } from 'rpx-xui-translation'; +import {FooterComponent} from "./shared/components/footer/footer.component"; +import {AccessibilityStatementComponent} from "./components/accessibility-statement/accessibility-statement.component"; const nonProductionProviders = [{ provide: HTTP_INTERCEPTORS, @@ -66,7 +68,9 @@ const nonProductionProviders = [{ CookieBannerComponent, CookiePolicyComponent, CookieDetailsComponent, - CookieTableComponent + CookieTableComponent, + AccessibilityStatementComponent, + FooterComponent ], imports: [ BrowserModule, diff --git a/src/app/components/accessibility-statement/accessibility-statement.component.html b/src/app/components/accessibility-statement/accessibility-statement.component.html new file mode 100644 index 000000000..eb5cd2284 --- /dev/null +++ b/src/app/components/accessibility-statement/accessibility-statement.component.html @@ -0,0 +1,74 @@ +
+
+ Back +

Accessibility statement for PayBubble

+ +

This accessibility statement applies to Paybubble: https://paybubble.platform.hmcts.net
+ This website is run by HM Courts and Tribunals Service. We want as many people as possible to be able to use this website. For example, that means you should be able to:

+ +
+ We've also made the website text as simple as possible to understand.
+ Please contact your line manager for advice on making your device easier to use if you have a disability.

+ +

How accessible this website is

+ +

We know some parts of this website are not fully accessible:

+ +
+

Reporting accessibility problems with this website

+ +

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: DTS-FeePayServiceDesk@hmcts.net for guidance to raise any issues.

+ +

Enforcement procedure

+ +

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, contact the Advisory and Support Service (EASS).

+ +

Technical information about this website's accessibility

+ +

HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.

+ +

Compliance status

+ +

This website is partially compliant with the Web Content Accessibility Guidelines version 2.1 AA standard, due to the non-compliances, listed below.

+ +

Non-accessible content

+ +

The content listed below is non-accessible for the following reasons.

+ +

Non-compliance with the accessibility regulations

+ +

A layout table is present but does not contain any header cells. The screen reader users are not able to associate the table data to table headings. This failed to meet 1.1.1 Non-Text Content Level A.
+ The headings are not hierarchical and heading level 2 is skipped. There are multiple links that are identified as text elements rather than links (This issue pertains only to Safari browser not Google Chrome). A group of radio buttons are not enclosed in a fieldset. This failed to meet 1.3.1 Info and Relationships Level A. + Some of the content gets lost or overlaps when the page is zoomed in to 200% on laptops and at actual size on a mobile device. This failed to meet 1.4.4 Resize Text Level AA.
+ Some content can be lost or overlaps on different smaller devices. This fails to meet 1.4.10 Reflow.
+ The highlight colour does not meet contrast requirements for links. The skip to main content link overlaps other content and then fails contrast. This failed to meet 1.4.11 Non-Text Contrast Level AA.
+ There are multiple links that cannot be tabbed to from the keyboard or do not receive keyboard focus. This failed to meet 2.1.1 Keyboard Level A.
+ The 'skip to main' content link does not skip to main content because the main content region is missing. The navigation landmark is also not present. This failed to meet 2.4.1 Bypass Blocks Level A.
+ The page titles are not unique and do not describe the page. This failed to meet 2.4.2 Page Titled Level A.
+ The pages look identical when searching for a case transaction, payment history, or service request. This could be confusing for users who might think they have not moved pages. The page has no h1 headings. This failed to meet 2.4.6 Headings and Labels Level AA.
+ The language of the document is not identified or the lang attribute value is invalid. This failed to meet 3.1.1 Language of Page Level A.
+ The keyboard focus is not taken to the error summary and is not announced to screen reader users immediately. This failed to meet 3.3.1 Error Identification Level A.
+ A form label is not accurate in its description so it would not make sense for screen reader users. Also, the words which visually label a component are not the words read by the screenreader. This failed to meet 3.3.2 Labels or Instructions Level A.
+ The status message for how many results were found is not announced to screen reader users. This failed to meet 4.1.3 Status Messages Level AA.

+ +

What we're doing to improve accessibility

+

We're committed to ensuring our services are accessible to all our users and that they comply with Web Content Accessibility Guidelines (WCAG) 2.2 Standard. To demonstrate this, we are going to engage with Digital Accessibility Centre to have a further review on 06/24
+ We're actively working to improve the identified issues and make them AA-compliant by 31/05/24

+ +

Preparation of this accessibility statement

+ This statement was published 14/03/24
+ This website was last tested on 15/06/22. The test was carried out by Internal Accessibility Team within HMCTS.
+ The full service was tested. +
+
diff --git a/src/app/components/accessibility-statement/accessibility-statement.component.scss b/src/app/components/accessibility-statement/accessibility-statement.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/components/accessibility-statement/accessibility-statement.component.spec.ts b/src/app/components/accessibility-statement/accessibility-statement.component.spec.ts new file mode 100644 index 000000000..ef657afb2 --- /dev/null +++ b/src/app/components/accessibility-statement/accessibility-statement.component.spec.ts @@ -0,0 +1,33 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { SpyLocation } from '@angular/common/testing'; +import { AccessibilityStatementComponent } from './accessibility-statement.component'; +import { Location } from '@angular/common'; + +describe('AccessibilityStatementComponent', () => { + let component: AccessibilityStatementComponent; + let fixture: ComponentFixture; + let location: SpyLocation; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [AccessibilityStatementComponent], + providers: [ + { provide: Location, useClass: SpyLocation } + ] + }); + fixture = TestBed.createComponent(AccessibilityStatementComponent); + component = fixture.componentInstance; + location = TestBed.get(Location); + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should go back to previous page on header button click', () => { + spyOn(location, 'back'); + component.backClicked(); + expect(location.back).toHaveBeenCalled(); + }); +}); diff --git a/src/app/components/accessibility-statement/accessibility-statement.component.ts b/src/app/components/accessibility-statement/accessibility-statement.component.ts new file mode 100644 index 000000000..2abd4c664 --- /dev/null +++ b/src/app/components/accessibility-statement/accessibility-statement.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { Location } from '@angular/common'; + +@Component({ + selector: 'app-accessibility-statement', + templateUrl: './accessibility-statement.component.html', + styleUrls: ['./accessibility-statement.component.scss'] +}) +export class AccessibilityStatementComponent { + constructor(private _location: Location) + {} + + backClicked() { + this._location.back(); + } +} diff --git a/src/app/components/cookie-banner/cookie-banner.component.spec.ts b/src/app/components/cookie-banner/cookie-banner.component.spec.ts index 2e83cbf59..e51d71834 100644 --- a/src/app/components/cookie-banner/cookie-banner.component.spec.ts +++ b/src/app/components/cookie-banner/cookie-banner.component.spec.ts @@ -38,40 +38,6 @@ describe('CookieBannerComponent', () => { it('should be created by angular', () => { expect(fixture).not.toBeNull(); }); - it ('should make a call all enable function and push', () => { - spyOn((windowTestBed as any).dtrum, 'enable').and.callThrough(); - spyOn((windowTestBed as any).dtrum, 'enableSessionReplay').and.callThrough(); - spyOn((windowTestBed as any).dataLayer, 'push').and.callThrough(); - - const preference = { apm: 'on' }; - - appComponent.preferenceFn((windowTestBed as any).dtrum, preference, (windowTestBed as any).dataLayer); - expect((windowTestBed as any).dataLayer.push).toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.enable).toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.enableSessionReplay).toHaveBeenCalled(); - }); - it ('should make a call all disable function and push', () => { - spyOn((windowTestBed as any).dtrum, 'disableSessionReplay').and.callThrough(); - spyOn((windowTestBed as any).dtrum, 'disable').and.callThrough(); - spyOn((windowTestBed as any).dataLayer, 'push').and.callThrough(); - const preference = { apm: 'off' }; - - appComponent.preferenceFn((windowTestBed as any).dtrum, preference, (windowTestBed as any).dataLayer); - expect((windowTestBed as any).dataLayer.push).toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.disableSessionReplay).toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.disable).toHaveBeenCalled(); - }); - it ('should make a call all disable function', () => { - spyOn((windowTestBed as any).dtrum, 'disableSessionReplay').and.callThrough(); - spyOn((windowTestBed as any).dtrum, 'disable').and.callThrough(); - spyOn((windowTestBed as any).dataLayer, 'push').and.callThrough(); - const preference = { apm: 'off' }; - - appComponent.preferenceFn(undefined, preference, (windowTestBed as any).dataLayer); - expect((windowTestBed as any).dataLayer.push).toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.disableSessionReplay).not.toHaveBeenCalled(); - expect((windowTestBed as any).dtrum.disable).not.toHaveBeenCalled(); - }); afterEach(() => { TestBed.resetTestingModule(); diff --git a/src/app/components/cookie-banner/cookie-banner.component.ts b/src/app/components/cookie-banner/cookie-banner.component.ts index 15a204095..70bb35c8c 100644 --- a/src/app/components/cookie-banner/cookie-banner.component.ts +++ b/src/app/components/cookie-banner/cookie-banner.component.ts @@ -20,69 +20,5 @@ export class CookieBannerComponent implements OnInit { this.window = window as Window; } - public ngOnInit(): void { - - const config = { - userPreferences: { - cookieName: 'ccpay-bubble-cookie-preferences', - }, - preferencesForm: { - class: 'cookie-preferences-form', - }, - cookieManifest: [ - { - categoryName: 'analytics', - cookies: [ - '_ga', - '_gid', - '_gat_UA-' - ] - }, - { - categoryName: 'apm', - cookies: [ - 'dtCookie', - 'dtLatC', - 'dtPC', - 'dtSa', - 'rxVisitor', - 'rxvt' - ] - }, - { - categoryName: 'essential', - optional: false, - matchBy: 'exact', - cookies: [ - '_csrf', - '__user-info' - ] - }, - ] - }; - - cookieManager.on('UserPreferencesLoaded', (preferences) => { - const dataLayer = window['dataLayer'] || []; - dataLayer.push({'event': 'Cookie Preferences', 'cookiePreferences': preferences}); - }); - cookieManager.on('UserPreferencesSaved', (preferences) => { - const dataLayer = window['dataLayer'] || []; - const dtrum = window['dtrum']; - this.preferenceFn(dtrum, preferences, dataLayer); - }); - cookieManager.init(config); - } - - preferenceFn(dtrum, preferences, dataLayer) { - dataLayer.push({'event': 'Cookie Preferences', 'cookiePreferences': preferences}); - if (dtrum !== undefined) { - if (preferences.apm === 'on') { - dtrum.enable(); - dtrum.enableSessionReplay(); - } else { - dtrum.disableSessionReplay(); - dtrum.disable(); - } - } - } + public ngOnInit(): void {} } diff --git a/src/app/components/cookie-policy/cookie-policy.component.html b/src/app/components/cookie-policy/cookie-policy.component.html index 5dd329621..8fe7f6a8b 100644 --- a/src/app/components/cookie-policy/cookie-policy.component.html +++ b/src/app/components/cookie-policy/cookie-policy.component.html @@ -1,7 +1,7 @@
- Back + Back