Skip to content

Commit

Permalink
fix: aria-hidden attribute not set when use svg icon
Browse files Browse the repository at this point in the history
  • Loading branch information
abdmmar committed Dec 26, 2021
1 parent 189310c commit daaa7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wc-toast-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export default class WCToastIcon extends HTMLElement {
connectedCallback() {
this.icon = this.getAttribute('icon');
this.type = this.getAttribute('type') || 'blank';
this.setAttribute('aria-hidden', 'true');

if (this.type === 'svg') return;

this.icon =
this.icon != null ? this.createIcon(this.type, this.icon) : this.createIcon(this.type);
this.setAttribute('aria-hidden', 'true');
this.shadowRoot.appendChild(this.icon);
}

Expand Down

0 comments on commit daaa7a9

Please sign in to comment.