diff --git a/libs/features/personalization/personalization.js b/libs/features/personalization/personalization.js index 29cfddd65d..d32285ed41 100644 --- a/libs/features/personalization/personalization.js +++ b/libs/features/personalization/personalization.js @@ -358,7 +358,7 @@ function modifySelectorTerm(termParam) { section: 'main > div', 'primary-cta': 'p strong a', 'secondary-cta': 'p em a', - 'action-area': 'p:has(em a, strong a)', + 'action-area': '*:has(> em a, > strong a)', }; const otherSelectors = ['row', 'col']; const htmlEls = ['main', 'div', 'a', 'p', 'strong', 'em', 'picture', 'source', 'img', 'h']; diff --git a/test/features/personalization/modifyNonFragmentSelector.test.js b/test/features/personalization/modifyNonFragmentSelector.test.js index 56db63e300..7b977c3874 100644 --- a/test/features/personalization/modifyNonFragmentSelector.test.js +++ b/test/features/personalization/modifyNonFragmentSelector.test.js @@ -4,7 +4,7 @@ import { modifyNonFragmentSelector } from '../../../libs/features/personalizatio const values = [ { b: 'main section1 marquee action-area', - a: 'main > div:nth-child(1) .marquee p:has(em a, strong a)', + a: 'main > div:nth-child(1) .marquee *:has(> em a, > strong a)', }, { b: 'main > section1 .marquee h2',