Skip to content

Commit

Permalink
fix(vertical-nav): remove title attribute from expand/collapse butt…
Browse files Browse the repository at this point in the history
…ons (#862)

The `title` attribute is read by some screen readers.

The `aria-expanded` attribute on the `button` conveys the expanded or
collapsed state. Reading the other state for the caret icon is confusing.
  • Loading branch information
kevinbuhmann committed Aug 8, 2023
1 parent d23d1d2 commit 989bfdd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
<div class="nav-group-text">
<ng-content></ng-content>
</div>
<cds-icon
shape="angle"
class="nav-group-trigger-icon"
[attr.direction]="expanded ? 'down' : 'right'"
[attr.title]="expanded ? commonStrings.keys.collapse : commonStrings.keys.expand"
></cds-icon>
<cds-icon shape="angle" class="nav-group-trigger-icon" [attr.direction]="expanded ? 'down' : 'right'"></cds-icon>
</button>
</div>
<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->
Expand Down
1 change: 0 additions & 1 deletion projects/angular/src/layout/vertical-nav/vertical-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
shape="angle-double"
class="nav-trigger-icon"
[attr.direction]="(this.collapsed) ? 'right' : 'left'"
[attr.title]="(this.collapsed) ? commonStrings.keys.expand : commonStrings.keys.collapse"
></cds-icon>
</button>
<div class="nav-content">
Expand Down

0 comments on commit 989bfdd

Please sign in to comment.