Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EUI-8430 MO accessibility issues from pa11y test #1199

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, Input} from '@angular/core';
import { Component, Input } from '@angular/core';
/*
* Gov Uk Form Group Wrapper
* Used to wrap group form elements in html tags below such as
Expand All @@ -24,9 +24,8 @@ import {Component, Input} from '@angular/core';
})
export class GovUkFormGroupWrapperComponent {
constructor () {}
@Input() error: {isInvalid: boolean; messages: string}; // todo add interface
@Input() error: { isInvalid: boolean; messages: string }; // todo add interface
@Input() group: string;
@Input() config: {hint: string; legend: string, key: string, isHeading: boolean;}; // TODO create a global interface

@Input() config: { hint: string; legend: string, key: string, isHeading: boolean; }; // TODO create a global interface
}

12 changes: 4 additions & 8 deletions projects/gov-ui/src/lib/util/helpers/html-templates.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ export class HtmlTemplatesHelper {
* Sets described by string depending if
* there is an error, error and hit or nothing
* */
static setDescribedBy(errorMessage, config) {
if (!errorMessage) {
return config.hint ? `${config.id}-hint` : null;
} else if (errorMessage && errorMessage.isInvalid) {
return config.hint ? `${config.id}-hint ${config.id}-error` : `${config.id}-error`;
} else {
return config.hint ? `${config.id}-hint` : null;
static setDescribedBy(errorMessage, config): string {
if (errorMessage?.isInvalid) {
return config.hint ? `${config.id}-hint ${config.id}-error` : `${config.id}-error`;
}
return null;
return config.hint ? `${config.id}-hint` : null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<h2 class="govuk-heading-xl">
{{item.legend.text}}
</h2>
</legend>
</legend>
<legend *ngIf="!item.legend"></legend>
<app-jui-form-elements [validate]="validate" [group]="group" [data]="item"></app-jui-form-elements>
<br>
</ng-container>
Expand Down
2 changes: 1 addition & 1 deletion src/register/containers/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 class="govuk-heading-xl">Register to manage civil, family, and tribunal law
<a href="#"[routerLink]="'/register-org/register/organisation-name'" role="button" draggable="false" class="govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" data-module="govuk-button" aria-label="Start registering organisation">
Start
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" role="presentation" focusable="false">
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" />
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" role="none" />
</svg>
</a>

Expand Down