Skip to content

Commit

Permalink
chore: add accessibility linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lgpage committed Dec 23, 2024
1 parent 9b9fb8c commit b0052e1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
Expand Down
15 changes: 13 additions & 2 deletions src/app/components/side-nav/side-nav.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<h2 class="p-2 text-center hover" (click)="goToHome()">RxJS Tutor</h2>
<h2
role="button"
tabindex="0"
aria-label="Go to home page"
class="p-2 text-center hover"
(click)="goToHome()"
(keyup)="goToHome()"
>
RxJS Tutor
</h2>

<mat-accordion>
<mat-expansion-panel *ngFor="let group of groupedExamples">
Expand All @@ -9,8 +18,10 @@ <h2 class="p-2 text-center hover" (click)="goToHome()">RxJS Tutor</h2>
<mat-nav-list class="p-0 ms-2">
<div
mat-list-item
class="hover py-1 ml-2"
role="button"
tabindex="0"
(click)="goToExample(example)"
(keyup)="goToExample(example)"
*ngFor="let example of group.examples"
>
{{ example.name }}
Expand Down

0 comments on commit b0052e1

Please sign in to comment.