diff --git a/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs b/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs index 2734833954..81135d2486 100644 --- a/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs +++ b/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs @@ -141,7 +141,7 @@ export class Accordion extends GOVUKFrontendComponent { if (!$sections.length) { throw new ElementError({ componentName: 'Accordion', - identifier: `Sections (\`.${this.sectionClass}\`)` + identifier: `Sections (\`
\`)` }) } @@ -208,7 +208,7 @@ export class Accordion extends GOVUKFrontendComponent { if (!$header) { throw new ElementError({ componentName: 'Accordion', - identifier: `Section headers (\`.${this.sectionHeaderClass}\`)` + identifier: `Section headers (\`
\`)` }) } @@ -247,7 +247,7 @@ export class Accordion extends GOVUKFrontendComponent { if (!$span) { throw new ElementError({ componentName: 'Accordion', - identifier: `Section button (\`.${this.sectionButtonClass}\`)` + identifier: `Section button (\`\`)` }) } @@ -414,7 +414,7 @@ export class Accordion extends GOVUKFrontendComponent { if (!$button) { throw new ElementError({ componentName: 'Accordion', - identifier: `Section button (\`.${this.sectionButtonClass}\`)` + identifier: `Section button (\`\`)` }) } diff --git a/packages/govuk-frontend/src/govuk/components/accordion/accordion.puppeteer.test.js b/packages/govuk-frontend/src/govuk/components/accordion/accordion.puppeteer.test.js index fce20f739c..ec8ca12900 100644 --- a/packages/govuk-frontend/src/govuk/components/accordion/accordion.puppeteer.test.js +++ b/packages/govuk-frontend/src/govuk/components/accordion/accordion.puppeteer.test.js @@ -776,7 +776,7 @@ describe('/components/accordion', () => { ).rejects.toEqual({ name: 'ElementError', message: - 'Accordion: Sections (`.govuk-accordion__section`) not found' + 'Accordion: Sections (`
`) not found' }) }) @@ -795,7 +795,7 @@ describe('/components/accordion', () => { ).rejects.toEqual({ name: 'ElementError', message: - 'Accordion: Section headers (`.govuk-accordion__section-header`) not found' + 'Accordion: Section headers (`
`) not found' }) }) @@ -829,7 +829,7 @@ describe('/components/accordion', () => { ).rejects.toEqual({ name: 'ElementError', message: - 'Accordion: Section button (`.govuk-accordion__section-button`) not found' + 'Accordion: Section button (``) not found' }) })