Skip to content

Commit 166bee2

Browse files
[ACS-10295] Fixed reading invalid input errors on profile page by screen reader (#4860)
1 parent 26b3393 commit 166bee2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

projects/aca-content/src/lib/components/view-profile/view-profile.component.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ <h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.LOCATION' |
6565
<h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.TELEPHONE' | translate}}</h4>
6666
<p class="app-profile-general-dropdown-details" *ngIf="generalSectionButtonsToggle">{{personDetails?.telephone}}</p>
6767
<input type="tel" name="Telephone" value="" formControlName="telephone" *ngIf="!generalSectionButtonsToggle"
68-
class="app-profile-general-dropdown-input-details app-selected">
69-
<mat-error class="app-error-message" *ngIf="profileForm.get('telephone').invalid">
68+
class="app-profile-general-dropdown-input-details app-selected" aria-describedby="app-view-profile-phone-error-message">
69+
<mat-error class="app-error-message" *ngIf="profileForm.get('telephone').invalid" role="alert" id="app-view-profile-phone-error-message">
7070
{{ 'APP.EDIT_PROFILE.INVALID_INPUT' | translate }}
7171
</mat-error>
7272
</div>
@@ -75,8 +75,8 @@ <h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.TELEPHONE'
7575
<h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.MOBILE' | translate}}</h4>
7676
<p class="app-profile-general-dropdown-details" *ngIf="generalSectionButtonsToggle">{{personDetails?.mobile}}</p>
7777
<input type="tel" value="" formControlName="mobile" *ngIf="!generalSectionButtonsToggle"
78-
class="app-profile-general-dropdown-input-details app-selected">
79-
<mat-error class="app-error-message" *ngIf="profileForm.get('mobile').invalid">
78+
class="app-profile-general-dropdown-input-details app-selected" aria-describedby="app-view-profile-mobile-error-message">
79+
<mat-error class="app-error-message" *ngIf="profileForm.get('mobile').invalid" role="alert" id="app-view-profile-mobile-error-message">
8080
{{ 'APP.EDIT_PROFILE.INVALID_INPUT' | translate }}
8181
</mat-error>
8282
</div>
@@ -131,8 +131,9 @@ <h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.POSTCODE' |
131131
<h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.TELEPHONE' | translate}}</h4>
132132
<p class="app-profile-general-dropdown-details" *ngIf="contactSectionButtonsToggle">{{personDetails?.company?.telephone}}</p>
133133
<input type="tel" value="" *ngIf="!contactSectionButtonsToggle" formControlName="companyTelephone"
134-
class="app-profile-general-dropdown-input-details app-selected">
135-
<mat-error class="app-error-message" *ngIf="profileForm.get('companyTelephone').invalid">
134+
class="app-profile-general-dropdown-input-details app-selected" aria-describedby="app-view-profile-company-phone-error-message">
135+
<mat-error class="app-error-message" *ngIf="profileForm.get('companyTelephone').invalid" role="alert"
136+
id="app-view-profile-company-phone-error-message">
136137
{{ 'APP.EDIT_PROFILE.INVALID_INPUT' | translate }}
137138
</mat-error>
138139
</div>
@@ -141,8 +142,9 @@ <h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.TELEPHONE'
141142
<h4 class="app-profile-general-dropdown-heading">{{'APP.EDIT_PROFILE.EMAIL' | translate}}</h4>
142143
<p class="app-profile-general-dropdown-details" *ngIf="contactSectionButtonsToggle">{{personDetails?.company?.email}}</p>
143144
<input type="text" value="" *ngIf="!contactSectionButtonsToggle" formControlName="companyEmail"
144-
class="app-profile-general-dropdown-input-details app-selected">
145-
<mat-error class="app-error-message" *ngIf="profileForm.get('companyEmail').invalid">
145+
class="app-profile-general-dropdown-input-details app-selected" aria-describedby="app-view-profile-company-email-error-message">
146+
<mat-error class="app-error-message" *ngIf="profileForm.get('companyEmail').invalid" role="alert"
147+
id="app-view-profile-company-email-error-message">
146148
{{ 'APP.EDIT_PROFILE.INVALID_INPUT' | translate }}
147149
</mat-error>
148150
</div>

0 commit comments

Comments
 (0)