diff --git a/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs b/packages/govuk-frontend/src/govuk/components/accordion/accordion.mjs index 2734833954..857f772f3a 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,14 +414,14 @@ export class Accordion extends GOVUKFrontendComponent { if (!$button) { throw new ElementError({ componentName: 'Accordion', - identifier: `Section button (\`.${this.sectionButtonClass}\`)` + identifier: `Section button (\`\`)` }) } if (!$content) { throw new ElementError({ componentName: 'Accordion', - identifier: `Section content (\`.${this.sectionContentClass}\`)` + identifier: `Section content (\`
\`)` }) } 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 aff7500207..192fb34b9b 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 @@ -783,7 +783,7 @@ describe('/components/accordion', () => { cause: { name: 'ElementError', message: - 'Accordion: Sections (`.govuk-accordion__section`) not found' + 'Accordion: Sections (`
`) not found' } }) }) @@ -804,7 +804,7 @@ describe('/components/accordion', () => { cause: { name: 'ElementError', message: - 'Accordion: Section headers (`.govuk-accordion__section-header`) not found' + 'Accordion: Section headers (`
`) not found' } }) }) @@ -842,7 +842,7 @@ describe('/components/accordion', () => { cause: { name: 'ElementError', message: - 'Accordion: Section button (`.govuk-accordion__section-button`) not found' + 'Accordion: Section button (``) not found' } }) }) @@ -861,7 +861,7 @@ describe('/components/accordion', () => { cause: { name: 'ElementError', message: - 'Accordion: Section content (`.govuk-accordion__section-content`) not found' + 'Accordion: Section content (`
`) not found' } }) })