Skip to content

Commit

Permalink
fix: enable screen reader to read file upload desc and error (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyl309 authored Aug 28, 2023
1 parent 565b83b commit 65e4d46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/file-uploader/file-uploader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const noop = () => { };
template: `
<ng-container *ngIf="!skeleton; else skeletonTemplate">
<label [for]="fileUploaderId" class="cds--file--label">{{title}}</label>
<p class="cds--label-description">{{description}}</p>
<p class="cds--label-description" role="alert">{{description}}</p>
<div class="cds--file">
<label
*ngIf="drop"
Expand Down
2 changes: 1 addition & 1 deletion src/file-uploader/file.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { FileItem } from "./file-item.interface";
[ariaLabel]="translations.CHECKMARK">
</svg>
</span>
<div class="cds--form-requirement" *ngIf="fileItem.invalid">
<div class="cds--form-requirement" role="alert" *ngIf="fileItem.invalid">
<div class="cds--form-requirement__title">{{fileItem.invalidTitle}}</div>
<p class="cds--form-requirement__supplement">{{fileItem.invalidText}}</p>
</div>
Expand Down

0 comments on commit 65e4d46

Please sign in to comment.