diff --git a/t-lang.js b/t-lang.js index 26b9c48..0eeae17 100644 --- a/t-lang.js +++ b/t-lang.js @@ -14,14 +14,19 @@ class TLang extends HTMLElement { render() { if (document.documentElement.lang.length > 0) { - if (!this.attributes.hasOwnProperty(document.documentElement.lang.toLowerCase())) { - this.style.setProperty('display', 'none') + if ( + this.attributes.hasOwnProperty( + document.documentElement.lang.toLowerCase(), + ) + ) { + this.style.setProperty("display", "inline"); + this.setAttribute("aria-hidden", "false"); } else { - this.style.setProperty('display', 'inline') + this.style.setProperty("display", "none"); + this.setAttribute("aria-hidden", "true"); } } } - } window.customElements.define('t-lang', TLang);