Skip to content

Commit

Permalink
fix(button): fixes icon only text for screen readers
Browse files Browse the repository at this point in the history
Previously the button text was set to visibility:hidden; this was preventing it being read out on
screen readers, updated to use the lg-visually-hidden mixin which is more screen reader friendly.
  • Loading branch information
andy-polhill authored and owensgit committed Nov 27, 2020
1 parent 3248dd2 commit 8c24443
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions projects/canopy/src/lib/button/button.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@
padding: var(--btn-icon-only-padding);

.lg-btn__text {
// retain height but not width
visibility: hidden;
white-space: nowrap;
width: 0;
@include lg-visually-hidden;
}

.lg-icon {
Expand Down

0 comments on commit 8c24443

Please sign in to comment.