8000 Revert "Using productCode instead productFamily." by seanchoi-dev · Pull Request #4325 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Revert "Using productCode instead productFamily." #4325

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 1 commit into from
Jun 5, 2025
Merged
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
6 changes: 3 additions & 3 deletions libs/blocks/merch/merch.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,17 +842,17 @@ export async function buildCta(el, params) {
});
}

// Adding aria-label for checkout-link using productCode and customerSegment as placeholder key.
// Adding aria-label for checkout-link using productFamily and customerSegment as placeholder key.
if (el.ariaLabel) {
// If Milo aria-label available from sharepoint doc, just use it.
cta.setAttribute('aria-label', el.ariaLabel);
} else if (!cta.ariaLabel) {
cta.onceSettled().then(async () => {< 6566 /span>
const productCode = cta.value[0]?.productArrangement?.productCode;
const productFamily = cta.value[0]?.productArrangement?.productFamily;
const { marketSegment, customerSegment } = cta;
const segment = marketSegment === 'EDU' ? marketSegment : customerSegment;
let ariaLabel = cta.textContent;
ariaLabel = productCode ? `${ariaLabel} - ${await replaceKey(productCode, getConfig())}` : ariaLabel;
ariaLabel = productFamily ? `${ariaLabel} - ${await replaceKey(productFamily, getConfig())}` : ariaLabel;
ariaLabel = segment ? `${ariaLabel} - ${await replaceKey(segment, getConfig())}` : ariaLabel;
cta.setAttribute('aria-label', ariaLabel);
});
Expand Down
Loading
0