Skip to content

Commit

Permalink
feat(description): make h2 accessible
Browse files Browse the repository at this point in the history
screen reader were reading them twice
  • Loading branch information
davidlj95 committed Sep 22, 2023
1 parent d99c574 commit 1c131a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/app/about/description/description.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<h2 *ngFor="let descriptionLine of descriptionLines">
<span class="material-symbols-outlined">{{ descriptionLine.symbol }}</span>
<span [innerHTML]="descriptionLine.text"></span>
<span aria-hidden="true">
<span class="material-symbols-outlined">{{ descriptionLine.symbol }}</span>
<span [innerHTML]="descriptionLine.text"></span>
</span>
<span class="sr-only" [innerHtml]="descriptionLine.text"></span>
</h2>
4 changes: 2 additions & 2 deletions src/app/about/description/description.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
justify-content: center;
gap: margins.$s;

h2 {
font-size: 1.1em;
h2 > span {
font-size: 1.1rem;
text-align: left;
width: fit-content;
display: flex;
Expand Down

0 comments on commit 1c131a8

Please sign in to comment.