8000 [Release] Stage to Main by milo-pr-merge[bot] · Pull Request #3772 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Release] Stage to Main #3772

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

Merged
merged 11 commits into from
Mar 6, 2025
Merged
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
18 changes: 0 additions & 18 deletions .github/workflows/merge-to-stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const {

// Run from the root of the project for local testing: node --env-file=.env .github/workflows/merge-to-stage.js
const PR_TITLE = '[Release] Stage to Main';
const SEEN = {};
const REQUIRED_APPROVALS = process.env.REQUIRED_APPROVALS ? Number(process.env.REQUIRED_APPROVALS) : 2;
const MAX_MERGES = process.env.MAX_PRS_PER_BATCH ? Number(process.env.MAX_PRS_PER_BATCH) : 8;
let existingPRCount = 0;
Expand Down Expand Up @@ -132,18 +131,6 @@ const merge = async ({ prs, type }) => {
for await (const { number, files, html_url, title } of prs) {
try {
if (mergeLimitExceeded()) return;
const fileOverlap = files.find((file) => SEEN[file]);
if (fileOverlap) {
commentOnPR(
`Skipped ${number}: "${title}" due to file "${fileOverlap}" overlap. Merging will be attempted in the next batch`,
number,
);
continue;
}
if (type !== LABELS.zeroImpact) {
files.forEach((file) => (SEEN[file] = true));
}

if (!process.env.LOCAL_RUN) {
await github.rest.pulls.merge({
owner,
Expand All @@ -166,7 +153,6 @@ const merge = async ({ prs, type }) => {
).catch(console.error);
await new Promise((resolve) => setTimeout(resolve, 5000));
} catch (error) {
files.forEach((file) => (SEEN[file] = false));
commentOnPR(`Error merging ${number}: ${title} ${error.message}`, number);
}
}
Expand All @@ -177,10 +163,6 @@ const getStageToMainPR = () => github.rest.pulls
.then(({ data } = {}) => data.find(({ title } = {}) => title === PR_TITLE))
.then((pr) => pr && addLabels({ pr, github, owner, repo }))
.then((pr) => pr && addFiles({ pr, github, owner, repo }))
.then((pr) => {
pr?.files.forEach((file) => (SEEN[file] = true));
return pr;
});

const openStageToMainPR = async () => {
const { data: comparisonData } = await github.rest.repos.compareCommits({
Expand Down
9E7A
Original file line number Diff line numberDiff line change
Expand Up @@ -5,7 +5,6 @@ import {
trigger,
closeAllDropdowns,
logErrorFor,
lanaLog,
} from '../../utilities/utilities.js';
import { replaceKeyArray } from '../../../../features/placeholders.js';
import { getConfig, getFedsPlaceholderConfig } from '../../../../utils/utils.js';
Expand All @@ -30,12 +29,11 @@ class Search {
this.icon = config.icon;
this.trigger = config.trigger;
this.parent = this.trigger.closest('.feds-nav-wrapper');
lanaLog({ message: `Search integrated on URL : ${window.location.href}`, tags: 'gnav-search', errorType: 'info' });
const observer = new MutationObserver(() => {
this.clearSearchForm();
});
observer.observe(this.trigger, { attributeFilter: ['aria-expanded'] });
logErrorFor(this.init.bind(this), 'Search init has failed', 'gnav-search', 'error');
logErrorFor(this.init.bind(this), 'Search init has failed', 'errorType=error,module=gnav-search');
}

async init() {
Expand Down
4 changes: 2 additions & 2 deletions libs/blocks/global-navigation/utilities/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export const selectors = {

export const icons = {
brand: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 64.57 35"><defs><style>.cls-1{fill: #eb1000;}</style></defs><path class="cls-1" d="M6.27,10.22h4.39l6.2,14.94h-4.64l-3.92-9.92-2.59,6.51h3.08l1.23,3.41H0l6.27-14.94ZM22.03,13.32c.45,0,.94.04,1.43.16v-3.7h3.88v14.72c-.89.4-2.81.89-4.73.89-3.48,0-6.47-1.98-6.47-5.93s2.88-6.13,5.89-6.13ZM22.52,22.19c.36,0,.65-.07.94-.16v-5.42c-.29-.11-.58-.16-.96-.16-1.27,0-2.45.94-2.45,2.92s1.2,2.81,2.47,2.81ZM34.25,13.32c3.23,0,5.98,2.18,5.98,6.02s-2.74,6.02-5.98,6.02-6-2.18-6-6.02,2.72-6.02,6-6.02ZM34.25,22.13c1.11,0,2.14-.89,2.14-2.79s-1.03-2.79-2.14-2.79-2.12.89-2.12,2.79.96,2.79,2.12,2.79ZM41.16,9.78h3.9v3.7c.47-.09.96-.16,1.45-.16,3.03,0,5.84,1.98,5.84,5.86,0,4.1-2.99,6.18-6.53,6.18-1.52,0-3.46-.31-4.66-.87v-14.72ZM45.91,22.17c1.34,0,2.56-.96,2.56-2.94,0-1.85-1.2-2.72-2.5-2.72-.36,0-.65.04-.91.16v5.35c.22.09.51.16.85.16ZM58.97,13.32c2.92,0,5.6,1.87,5.6,5.64,0,.51-.02,1-.09,1.49h-7.27c.4,1.32,1.56,1.94,3.01,1.94,1.18,0,2.27-.29,3.5-.82v2.97c-1.14.58-2.5.82-3.9.82-3.7,0-6.58-2.23-6.58-6.02s2.61-6.02,5.73-6.02ZM60.93,18.02c-.2-1.27-1.05-1.78-1.92-1.78s-1.58.54-1.87,1.78h3.79Z"/></svg>',
company: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 133.5 118.1"><defs><style>.cls-1 {fill: #eb1000;}</style></defs><g><g><polygon class="cls-1" points="84.1 0 133.5 0 133.5 118.1 84.1 0"/><polygon class="cls-1" points="49.4 0 0 0 0 118.1 49.4 0"/><polygon class="cls-1" points="66.7 43.5 98.2 118.1 77.6 118.1 68.2 94.4 45.2 94.4 66.7 43.5"/></g></g></svg>',
company: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="22" viewBox="0 0 24 22" fill="none"><path d="M14.2353 21.6209L12.4925 16.7699H8.11657L11.7945 7.51237L17.3741 21.6209H24L15.1548 0.379395H8.90929L0 21.6209H14.2353Z" fill="#EB1000"/></svg>',
search: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" focusable="false"><path d="M14 2A8 8 0 0 0 7.4 14.5L2.4 19.4a1.5 1.5 0 0 0 2.1 2.1L9.5 16.6A8 8 0 1 0 14 2Zm0 14.1A6.1 6.1 0 1 1 20.1 10 6.1 6.1 0 0 1 14 16.1Z"></path></svg>',
home: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="25" viewBox="0 0 18 18" width="25"><path fill="#6E6E6E" d="M17.666,10.125,9.375,1.834a.53151.53151,0,0,0-.75,0L.334,10.125a.53051.53051,0,0,0,0,.75l.979.9785A.5.5,0,0,0,1.6665,12H2v4.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5v-5a.5.5,0,0,1,.5-.5h3a.5.5,0,0,1,.5.5v5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V12h.3335a.5.5,0,0,0,.3535-.1465l.979-.9785A.53051.53051,0,0,0,17.666,10.125Z"/></svg>',
};

export const darkIcons = {
...icons,
brand: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 64.57 35"><defs><style>.cls-1{fill: #fff;}</style></defs><path class="cls-1" d="M6.27,10.22h4.39l6.2,14.94h-4.64l-3.92-9.92-2.59,6.51h3.08l1.23,3.41H0l6.27-14.94ZM22.03,13.32c.45,0,.94.04,1.43.16v-3.7h3.88v14.72c-.89.4-2.81.89-4.73.89-3.48,0-6.47-1.98-6.47-5.93s2.88-6.13,5.89-6.13h0ZM22.52,22.19c.36,0,.65-.07.94-.16v-5.42c-.29-.11-.58-.16-.96-.16-1.27,0-2.45.94-2.45,2.92s1.2,2.81,2.47,2.81h0ZM34.25,13.32c3.23,0,5.98,2.18,5.98,6.02s-2.74,6.02-5.98,6.02-6-2.18-6-6.02,2.72-6.02,6-6.02ZM34.25,22.13c1.11,0,2.14-.89,2.14-2.79s-1.03-2.79-2.14-2.79-2.12.89-2.12,2.79.96,2.79,2.12,2.79ZM41.16,9.78h3.9v3.7c.47-.09.96-.16,1.45-.16,3.03,0,5.84,1.98,5.84,5.86,0,4.1-2.99,6.18-6.53,6.18-1.52,0-3.46-.31-4.66-.87v-14.72h0ZM45.91,22.17c1.34,0,2.56-.96,2.56-2.94,0-1.85-1.2-2.72-2.5-2.72-.36,0-.65.04-.91.16v5.35c.22.09.51.16.85.16h0ZM58.97,13.32c2.92,0,5.6,1.87,5.6,5.64,0,.51-.02,1-.09,1.49h-7.27c.4,1.32,1.56,1.94,3.01,1.94,1.18,0,2.27-.29,3.5-.82v2.97c-1.14.58-2.5.82-3.9.82-3.7,0-6.58-2.23-6.58-6.02s2.61-6.02,5.73-6.02ZM60.93,18.02c-.2-1.27-1.05-1.78-1.92-1.78s-1.58.54-1.87,1.78c0,0,3.79,0,3.79,0Z"/></svg>',
company: '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 133.5 118.1"><defs><style>.cls-1 {fill: currentColor;}</style></defs><g><g><polygon class="cls-1" points="84.1 0 133.5 0 133.5 118.1 84.1 0"/><polygon class="cls-1" points="49.4 0 0 0 0 118.1 49.4 0"/><polygon class="cls-1" points="66.7 43.5 98.2 118.1 77.6 118.1 68.2 94.4 45.2 94.4 66.7 43.5"/></g></g></svg>',
company: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="22" viewBox="0 0 24 22" fill="none"><path d="M14.2353 21.6209L12.4925 16.7699H8.11657L11.7945 7.51237L17.3741 21.6209H24L15.1548 0.379395H8.90929L0 21.6209H14.2353Z" fill="#FFFFFF"/></svg>',
};

export const lanaLog = ({ message, e = '', tags = 'default', errorType }) => {
Expand Down
2 changes: 2 additions & 0 deletions libs/blocks/marketo/marketo.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const FORM_MAP = {
'success-section': SUCCESS_SECTION,
'co-partner-names': 'program.copartnernames',
'sfdc-campaign-id': 'program.campaignids.sfdc',
'poi-field': 'field_filters.products',
'hardcoded-poi': 'program.poi',
};
export const FORM_PARAM = 'form';

Expand Down
20 changes: 20 additions & 0 deletions libs/blocks/merch/merch.css
< 10000 td class="blob-num blob-num-addition empty-cell">
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ a[is='checkout-link'].con-button > span {
content: "\00a0";
}

.three-in-one {
display: flex;
height: 100%;
}

.three-in-one .loading iframe {
visibility: hidden;
}

.three-in-one sp-theme {
height: 100%;
width: 100%;
align-content: center;
}

.three-in-one sp-theme sp-progress-circle {
inset-inline-start: 50%;
transform: translate(-50%);
}

@media (max-width: 1199px) {
#checkout-link-modal {
height: 100vh;
Expand Down
31 changes: 11 additions & 20 deletions libs/blocks/merch/merch.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ async function openExternalModal(url, getModal, extraOptions) {

const isInternalModal = (url) => /\/fragments\//.test(url);

export async function openModal(e, url, offerType, hash, extraOptions) {
export async function openModal(e, url, offerType, hash, extraOptions, el) {
e.preventDefault();
e.stopImmediatePropagation();
const { getModal } = await import('../modal/modal.js');
Expand All @@ -489,14 +489,18 @@ export async function openModal(e, url, offerType, hash, extraOptions) {
const prevHash = window.location.hash.replace('#', '') === hash ? '' : window.location.hash;
window.location.hash = hash;
window.addEventListener('milo:modal:closed', () => {
window.history.pushState({}, document.title, `#${prevHash}`);
window.history.pushState({}, document.title, prevHash !== '' ? `#${prevHash}` : `${window.location.pathname}${window.location.search}`);
}, { once: true });
}
if (isInternalModal(url)) {
const fragmentPath = url.split(/(hlx|aem).(page|live)/).pop();
modal = await openFragmentModal(fragmentPath, getModal);
} else if (el?.opens3in1Modal) {
const { default: openThreeInOneModal, handle3in1IFrameEvents } = await import('./three-in-one.js');
window.addEventListener('message', handle3in1IFrameEvents);
modal = await openThreeInOneModal(el);
} else {
modal = await openExternalModal(url, getModal, extraOptions);
modal = await openExternalModal(url, getModal, extraOptions, el);
}
if (modal) {
modal.classList.add(offerTypeClass);
Expand Down Expand Up @@ -539,7 +543,10 @@ export async function getModalAction(offers, options, el) {
if (!url) return undefined;
url = isInternalModal(url) || isProdModal(url)
? localizeLink(checkoutLinkConfig[columnName]) : checkoutLinkConfig[columnName];
return { url, handler: (e) => openModal(e, url, offerType, hash, options.extraOptions) };
return {
url,
handler: (e) => openModal(e, url, offerType, hash, options.extraOptions, el),
};
}

export async function getCheckoutAction(offers, options, imsSignedInPromise, el) {
Expand Down Expand Up @@ -760,19 +767,3 @@ export default async function init(el) {
log.warn('Failed to get context:', { el });
return null;
}

export async function handleHashChange() {
const modalDialog = document.querySelector('.dialog-modal');
if (window.location.hash) {
const modalId = window.location.hash.replace('#', '');
const cta = document.querySelector(`.con-button[data-modal-id="${modalId}"]`);
if (!modalDialog) {
reopenModal(cta);
}
} else if (modalDialog) {
const { closeModal } = await import('../modal/modal.js');
closeModal(modalDialog);
}
}

window.addEventListener('hashchange', handleHashChange);
82 changes: 82 additions & 0 deletions libs/blocks/merch/three-in-one.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/* eslint-disable import/no-relative-packages */
import { createTag } from '../../utils/utils.js';
import { MODAL_TYPE_3_IN_1 } from '../../deps/mas/mas.js';
import '../../features/spectrum-web-components/dist/theme.js';
import '../../features/spectrum-web-components/dist/progress-circle.js';

export const MSG_SUBTYPE = {
AppLoaded: 'AppLoaded',
EXTERNAL: 'EXTERNAL',
SWITCH: 'SWITCH',
RETURN_BACK: 'RETURN_BACK',
OrderComplete: 'OrderComplete',
Error: 'Error',
Close: 'Close',
};

export const LANA_OPTIONS = {
clientId: 'merch-at-scale',
sampleRate: 10,
tags: 'three-in-one',
};

export const handle3in1IFrameEvents = ({ data: msgData }) => {
let parsedMsg = null;
try {
parsedMsg = JSON.parse(msgData);
} catch (error) {
return;
}
const { app, subType, data } = parsedMsg || {};
if (app !== 'ucv3') return;
window.lana?.log(`3-in-1 modal: ${subType}`, LANA_OPTIONS);
const threeInOne = document.querySelector('.three-in-one');
const closeBtn = threeInOne?.querySelector('.dialog-close');
if (!threeInOne) return;
switch (subType) {
case MSG_SUBTYPE.AppLoaded:
threeInOne.querySelector('iframe')?.classList.remove('loading');
threeInOne.querySelector('sp-theme')?.remove();
if (closeBtn) {
closeBtn.setAttribute('aria-hidden', 'true');
closeBtn.style.opacity = '0';
}
break;
case MSG_SUBTYPE.EXTERNAL:
case MSG_SUBTYPE.SWITCH:
case MSG_SUBTYPE.RETURN_BACK:
if (data?.externalUrl && data.target) {
window.open(data.externalUrl, data.target);
}
break;
case MSG_SUBTYPE.Close:
document.querySelector('.dialog-modal.three-in-one')?.dispatchEvent(new Event('closeModal'));
window.removeEventListener('message', handle3in1IFrameEvents);
break;
default:
break;
}
};

export async function createContent(iframeUrl, modalType) {
const content = createTag('div', { class: 'milo-iframe' });
content.innerHTML = `<sp-theme system="light" color="light" scale="medium" dir="ltr">
<sp-progress-circle label="progress circle" indeterminate="" size="l" dir="ltr" role="progressbar" aria-label="progress circle"></sp-progress-circle>
</sp-theme>
<iframe src="${iframeUrl}" title="${modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : modalType}" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" loading="lazy" class="loading" style="height: 100%;"></iframe>`;
Comment on lines +63 to +66

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix

AI 4 months ago

To fix the problem, we need to ensure that the modalType value is properly sanitized or escaped before being used in the HTML. One effective way to do this is to use a library like DOMPurify to sanitize the modalType value. This will prevent any malicious scripts from being executed.

  1. Import the DOMPurify library.
  2. Sanitize the modalType value before using it in the innerHTML assignment.
Suggested changeset 2
libs/blocks/merch/three-in-one.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/libs/blocks/merch/three-in-one.js b/libs/blocks/merch/three-in-one.js
--- a/libs/blocks/merch/three-in-one.js
+++ b/libs/blocks/merch/three-in-one.js
@@ -3,2 +3,3 @@
 import { MODAL_TYPE_3_IN_1 } from '../../deps/mas/mas.js';
+import DOMPurify from 'dompurify';
 import '../../features/spectrum-web-components/dist/theme.js';
@@ -65,3 +66,3 @@
   </sp-theme>
-  <iframe src="${iframeUrl}" title="${modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : modalType}" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" loading="lazy" class="loading" style="height: 100%;"></iframe>`;
+  <iframe src="${iframeUrl}" title="${modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : DOMPurify.sanitize(modalType)}" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" loading="lazy" class="loading" style="height: 100%;"></iframe>`;
   return content;
EOF
@@ -3,2 +3,3 @@
import { MODAL_TYPE_3_IN_1 } from '../../deps/mas/mas.js';
import DOMPurify from 'dompurify';
import '../../features/spectrum-web-components/dist/theme.js';
@@ -65,3 +66,3 @@
</sp-theme>
<iframe src="${iframeUrl}" title="${modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : modalType}" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" loading="lazy" class="loading" style="height: 100%;"></iframe>`;
<iframe src="${iframeUrl}" title="${modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : DOMPurify.sanitize(modalType)}" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen="true" loading="lazy" class="loading" style="height: 100%;"></iframe>`;
return content;
package.json
Outside changed files

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -35,3 +35,4 @@
     "htm": "^3.1.1",
-    "preact": "^10.11.0"
+    "preact": "^10.11.0",
+    "dompurify": "^3.2.4"
   },
EOF
@@ -35,3 +35,4 @@
"htm": "^3.1.1",
"preact": "^10.11.0"
"preact": "^10.11.0",
"dompurify": "^3.2.4"
},
This fix introduces these dependencies
Package Version Security advisories
dompurify (npm) 3.2.4 None
Copilot is powered by AI and may make mistakes. Always verify output.
return content;
}

export default async function openThreeInOneModal(el) {
const iframeUrl = el?.href;
const modalType = el?.getAttribute('data-modal-type');
if (!modalType || !iframeUrl) return undefined;
const { getModal } = await import('../modal/modal.js');
const content = await createContent(iframeUrl, modalType);
return getModal(null, {
id: 'three-in-one',
content,
closeEvent: 'closeModal',
class: 'three-in-one',
});
}
59 changes: 38 additions & 21 deletions libs/blocks/modal/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,31 @@
z-index: 102;
}

.dialog-modal.upgrade-flow-modal,
.dialog-modal.three-in-one {
height: 100%;
width: 100%;
max-height: 100%;
max-width: 100%;
overflow: hidden;
}

.upgrade-flow-modal .dialog-close {
display: none;
}

.upgrade-flow-modal .upgrade-flow-iframe,
.three-in-one .milo-iframe {
overflow: hidden;
height: 100%;
width: 100%;
box-sizing: border-box;
}

.three-in-one iframe {
width: 100%;
}

#locale-modal-v2 .dialog-close,
#locale-modal-v2 .georouting-wrapper {
display: block;
Expand Down Expand Up @@ -72,25 +97,6 @@
}
}

.dialog-modal.upgrade-flow-modal {
height: 100%;
width: 100%;
max-height: 100%;
max-width: 100%;
overflow: hidden;
}

.upgrade-flow-modal .dialog-close {
display: none;
}

.upgrade-flow-modal .upgrade-flow-iframe {
overflow: hidden;
height: 100%;
width: 100%;
box-sizing: border-box;
}

.modal-curtain.is-open {
position: fixed;
top: 0;
Expand Down Expand Up @@ -238,6 +244,10 @@
width: fit-content;
}

.dialog-modal.three-in-one {
width: 100%;
}

.dialog-modal .embed-vimeo {
min-width: 80vw;
}
Expand Down Expand Up @@ -282,7 +292,7 @@
max-width: 100%;
max-height: 100%;
}

.dialog-modal.upgrade-flow-modal {
border-radius: 0;
}
Expand Down Expand Up @@ -355,14 +365,21 @@
.dialog-modal.commerce-frame .milo-iframe iframe {
height: 0%;
}

.dialog-modal.upgrade-flow-modal {
height: 820px;
max-width: 1100px;
overflow: hidden;
width: 80%;
}

.dialog-modal.three-in-one {
height: 820px;
width: 80%;
max-width: 1100px;
overflow: hidden;
}

.dialog-modal.tall-video,
.dialog-modal.tall-video .milo-video {
--modal-width-var: 35vw;
Expand Down
5 changes: 3 additions & 2 deletions libs/blocks/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function handleHeading(table, headingCols) {
}

const trackingHeader = col.querySelector('.tracking-header');
const nodeToApplyRoleScope = trackingHeader ?? col;

if (trackingHeader) {
const trackingHeaderID = `t${tableIndex + 1}-c${i + 1}-header`;
Expand All @@ -94,7 +93,9 @@ function handleHeading(table, headingCols) {
col.setAttribute('role', 'columnheader');
}

nodeToApplyRoleScope.setAttribute('scope', 'col');
col.querySelectorAll('h1, h2, h3, h4, h5, h6').forEach((heading) => {
heading.setAttribute('role', 'paragraph');
});
});
}

Expand Down
5 changes: 4 additions & 1 deletion libs/blocks/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ function configTabs(config, rootElem) {
if (config['active-tab']) {
const id = `#tab-${CSS.escape(config['tab-id'])}-${CSS.escape(getStringKeyName(config['active-tab']))}`;
const sel = rootElem.querySelector(id);
if (sel) sel.click();
if (sel) {
sel.addEventListener('click', (e) => e.stopPropagation(), { once: true });
sel.click();
}
}
const tabParam = new URLSearchParams(window.location.search).get('tab');
if (!tabParam) return;
Expand Down
4 changes: 2 additions & 2 deletions libs/deps/mas/commerce.js

Large diffs are not rendered by default.

Loading
Loading
0