Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting aria-live to shadowRoot element instead to the slot. #3389

Open
wants to merge 4 commits into
base: stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,6 @@ export default async function init(el) {
literalEl.remove();
if (slot) {
slot.setAttribute('slot', LITERAL_SLOTS[index]);
if (LITERAL_SLOTS[index].toLowerCase().includes('result')) {
slot.setAttribute('aria-live', 'polite');
}
index += 1;
}
literalSlots.push(slot);
Expand Down Expand Up @@ -338,5 +335,6 @@ export default async function init(el) {
'merch-card-collection-render',
'merch-card-collection-render:start',
);

return merchCardCollection;
}
4 changes: 2 additions & 2 deletions libs/deps/mas/commerce.js

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions libs/deps/mas/mas.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libs/deps/mas/merch-card-collection.js
seanchoi-dev marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var N=Object.defineProperty;var y=(s,e,t)=>e in s?N(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var E=(s,e,t)=>(y(s,typeof e!="symbol"?e+"":e,t),t);import{html as l,LitElement as O}from"../lit-all.min.js";var f=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};var x="hashchange";function L(s=window.location.hash){let e=[],t=s.replace(/^#/,"").split("&");for(let o of t){let[n,i=""]=o.split("=");n&&e.push([n,decodeURIComponent(i.replace(/\+/g," "))])}return Object.fromEntries(e)}function d(s){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(s).forEach(([n,i])=>{i?e.set(n,i):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let o=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,o)}function T(s){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=L(window.location.hash);s(t)};return e(),window.addEventListener(x,e),()=>{window.removeEventListener(x,e)}}var g="merch-card-collection:sort",S="merch-card-collection:showmore";var A="(max-width: 1199px)",R="(min-width: 768px)",C="(min-width: 1200px)";import{css as M,unsafeCSS as w}from"../lit-all.min.js";var b=M`
var N=Object.defineProperty;var y=(s,e,t)=>e in s?N(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var E=(s,e,t)=>y(s,typeof e!="symbol"?e+"":e,t);import{html as l,LitElement as O}from"../lit-all.min.js";var f=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};var x="hashchange";function L(s=window.location.hash){let e=[],t=s.replace(/^#/,"").split("&");for(let o of t){let[n,i=""]=o.split("=");n&&e.push([n,decodeURIComponent(i.replace(/\+/g," "))])}return Object.fromEntries(e)}function d(s){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(s).forEach(([n,i])=>{i?e.set(n,i):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let o=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,o)}function T(s){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=L(window.location.hash);s(t)};return e(),window.addEventListener(x,e),()=>{window.removeEventListener(x,e)}}var g="merch-card-collection:sort",S="merch-card-collection:showmore";var A="(max-width: 1199px)",R="(min-width: 768px)",C="(min-width: 1200px)";import{css as M,unsafeCSS as w}from"../lit-all.min.js";var b=M`
#header,
#resultText,
#footer {
Expand Down Expand Up @@ -103,7 +103,7 @@ var N=Object.defineProperty;var y=(s,e,t)=>e in s?N(s,e,{enumerable:!0,configura
${this.searchBar} ${this.filtersButton} ${this.sortButton}
</sp-theme>
</div>
<div id="resultText">
<div id="resultText" aria-live="polite">
${this.displayResult?l`<slot name="${this.resultTextSlotName}"></slot>`:""}
</div>`}get footer(){if(!this.filtered)return l`<div id="footer">
<sp-theme color="light" scale="medium">
Expand Down
88 changes: 44 additions & 44 deletions libs/deps/mas/merch-card.js
seanchoi-dev marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/deps/mas/merch-icon.js
seanchoi-dev marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var g=Object.defineProperty;var a=(i,t,s)=>t in i?g(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var h=(i,t,s)=>(a(i,typeof t!="symbol"?t+"":t,s),s);import{LitElement as m,html as r,css as l}from"../lit-all.min.js";var e=class extends m{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?r`<a href="${t}">
var g=Object.defineProperty;var a=(i,t,s)=>t in i?g(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var h=(i,t,s)=>a(i,typeof t!="symbol"?t+"":t,s);import{LitElement as m,html as r,css as l}from"../lit-all.min.js";var e=class extends m{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?r`<a href="${t}">
<img src="${this.src}" alt="${this.alt}" loading="lazy" />
</a>`:r` <img src="${this.src}" alt="${this.alt}" loading="lazy" />`}};h(e,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),h(e,"styles",l`
:host {
Expand Down
6 changes: 3 additions & 3 deletions libs/deps/mas/merch-mnemonic-list.js
seanchoi-dev marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var o=Object.defineProperty;var r=(e,t,i)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var n=(e,t,i)=>(r(e,typeof t!="symbol"?t+"":t,i),i);import{html as l,css as p,LitElement as a}from"../lit-all.min.js";var s=class extends a{constructor(){super()}render(){return l`
var o=Object.defineProperty;var r=(e,t,s)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var n=(e,t,s)=>r(e,typeof t!="symbol"?t+"":t,s);import{html as l,css as p,LitElement as a}from"../lit-all.min.js";var i=class extends a{constructor(){super()}render(){return l`
<slot name="icon"></slot>
<slot name="description">${this.description}</slot>
`}};n(s,"styles",p`
`}};n(i,"styles",p`
:host {
display: flex;
flex-direction: row;
Expand All @@ -27,4 +27,4 @@ var o=Object.defineProperty;var r=(e,t,i)=>t in e?o(e,t,{enumerable:!0,configura
:host .hidden {
display: none;
}
`),n(s,"properties",{description:{type:String,attribute:!0}});customElements.define("merch-mnemonic-list",s);export{s as MerchMnemonicList};
`),n(i,"properties",{description:{type:String,attribute:!0}});customElements.define("merch-mnemonic-list",i);export{i as MerchMnemonicList};
Loading
Loading