Skip to content

Commit

Permalink
fix(docs-infra): add missing aria-labels to contributors page (#46324)
Browse files Browse the repository at this point in the history
add proper aria-labels for the twitter and website link of contributors
(which being icons they have no text) so that they can be correctly read
by screenreaders

also add aria-labels to the view-bio buttons for a better user
experience

PR Close #46324
  • Loading branch information
dario-piotrowicz authored and jessicajaniuk committed Jun 10, 2022
1 parent caa2f35 commit 5e20f60
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -15,15 +15,18 @@ import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
<div class="contributor-image"
[style.background-image]="'url('+pictureBase+(person.picture || noPicture)+')'">
<div class="contributor-info">
<button *ngIf="person.bio" mat-button class="info-item">
<button *ngIf="person.bio" mat-button class="info-item"
attr.aria-label="view bio of {{person.name}}">
View Bio
</button>
<a *ngIf="person.twitter" mat-icon-button class="info-item icon"
attr.aria-label="twitter of {{person.name}}"
href="https://twitter.com/{{person.twitter}}"
target="_blank" (click)="$event.stopPropagation()">
<mat-icon svgIcon="logos:twitter"></mat-icon>
</a>
<a *ngIf="person.website" mat-icon-button class="info-item icon"
attr.aria-label="website of {{person.name}}"
href="{{person.website}}" target="_blank" (click)="$event.stopPropagation()">
<mat-icon class="link-icon">link</mat-icon>
</a>
Expand Down

0 comments on commit 5e20f60

Please sign in to comment.