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

[Release] Stage to Main #3478

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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 @@ -304,9 +304,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 @@ -343,5 +340,6 @@ export default async function init(el) {
'merch-card-collection-render',
'merch-card-collection-render:start',
);

return merchCardCollection;
}
6 changes: 5 additions & 1 deletion libs/blocks/quiz-marquee/quiz-marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ export default async function init(el) {
[...rows].forEach(async (row) => {
const cols = row.querySelectorAll(':scope > div');
const isFragRow = cols[0].textContent.trim() === 'nested-fragments';
const isList = cols[2]?.textContent?.trim() === 'list' || false;

if (isFragRow) {
cols[0].parentElement.classList.add('nested', cols[1].textContent.trim());
const fragParent = cols[0].parentElement;
fragParent?.classList.add('nested', cols[1]?.textContent?.trim());
if (isList) fragParent.setAttribute('role', 'list');

const wrapper = createTag('div', { class: 'copy-wrapper' });
row.append(wrapper);
wrapper.append(...cols);
Expand Down
1 change: 1 addition & 0 deletions libs/blocks/quiz-results/quiz-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ async function loadFragments(el, experiences) {
}
document.querySelectorAll('main > div, .quiz-results').forEach((quiz) => quiz.removeAttribute('daa-lh'));
document.querySelectorAll('.quiz-results.basic > .fragment > .section').forEach((section, idx) => decorateSectionAnalytics(section, idx, getConfig()));
if (el.getAttribute('role') === 'list') document.querySelectorAll('.nested[role=list] > .fragment').forEach((fragment) => fragment.setAttribute('role', 'listitem'));
}

function redirectPage(quizUrl, debug, message) {
Expand Down
2 changes: 1 addition & 1 deletion libs/deps/mas/merch-card-collection.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion libs/features/mas/src/merch-card-collection.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class MerchCardCollection extends LitElement {
${this.searchBar} ${this.filtersButton} ${this.sortButton}
</sp-theme>
</div>
<div id="resultText">
<div id="resultText" aria-live="polite">
${this.displayResult
? html`<slot name="${this.resultTextSlotName}"></slot>`
: ''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
</div>

<!--this the expected merch-cards element -->
<merch-card-collection filter="all" class="merch-card-collection catalog" limit="18"><p slot="searchText">Search all products</p><p slot="filtersText">Filters</p><p slot="sortText">Sort</p><p slot="popularityText">Popularity</p><p slot="alphabeticallyText">Alphabetical</p><p slot="noResultText" aria-live="polite">0 results</p><p slot="resultText" aria-live="polite">1 result in <strong><span data-placeholder="filter"></span></strong></p><p slot="resultsText" aria-live="polite"><span data-placeholder="resultCount"></span> results in <strong><span data-placeholder="filter"></span></strong></p><p slot="searchResultText" aria-live="polite">1 result for <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultsText" aria-live="polite"><span data-placeholder="resultCount"></span> results for <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultMobileText" aria-live="polite">1 result for: <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultsMobileText" aria-live="polite"><span data-placeholder="resultCount"></span> results for: <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="noSearchResultsText" aria-live="polite">Your search for <strong><span data-placeholder="searchTerm"></span></strong> did not yield any results</p><div slot="noSearchResultsMobileText" aria-live="polite"><p>Your search for <strong><span data-placeholder="searchTerm"></span></strong> did not yield any results. Try a different search term.</p><p>Suggestions:</p><ul>
<merch-card-collection filter="all" class="merch-card-collection catalog" limit="18"><p slot="searchText">Search all products</p><p slot="filtersText">Filters</p><p slot="sortText">Sort</p><p slot="popularityText">Popularity</p><p slot="alphabeticallyText">Alphabetical</p><p slot="noResultText">0 results</p><p slot="resultText">1 result in <strong><span data-placeholder="filter"></span></strong></p><p slot="resultsText"><span data-placeholder="resultCount"></span> results in <strong><span data-placeholder="filter"></span></strong></p><p slot="searchResultText">1 result for <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultsText"><span data-placeholder="resultCount"></span> results for <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultMobileText">1 result for: <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="searchResultsMobileText"><span data-placeholder="resultCount"></span> results for: <strong><span data-placeholder="searchTerm"></span></strong></p><p slot="noSearchResultsText">Your search for <strong><span data-placeholder="searchTerm"></span></strong> did not yield any results</p><div slot="noSearchResultsMobileText"><p>Your search for <strong><span data-placeholder="searchTerm"></span></strong> did not yield any results. Try a different search term.</p><p>Suggestions:</p><ul>
<li>Make sure all words are spelled correctly</li>
<li>Use quotes to search for an entire phrase, such as "crop an image"</li>
</ul></div><p slot="showMoreText">Show more</p></merch-card-collection>
Expand Down
Loading