From 32a6181bc1170da564cf15e82c7e1b120b6fd526 Mon Sep 17 00:00:00 2001 From: owenatgov Date: Fri, 29 Sep 2023 16:08:59 +0100 Subject: [PATCH] Remove heading class in table docs This isn't necessary as we already have heading style modifiers for table captions. This does mean it's inconsistent with our docs that say they should correspond with heading typography classes. Suggest we should solve this holistically down the line. --- packages/govuk-frontend/src/govuk/components/table/table.yaml | 2 +- .../govuk-frontend/src/govuk/components/table/template.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/govuk-frontend/src/govuk/components/table/table.yaml b/packages/govuk-frontend/src/govuk/components/table/table.yaml index e1d271a27d..fb7ff8795f 100644 --- a/packages/govuk-frontend/src/govuk/components/table/table.yaml +++ b/packages/govuk-frontend/src/govuk/components/table/table.yaml @@ -132,7 +132,7 @@ examples: - name: table with head and caption options: caption: 'Caption 1: Months and rates' - captionClasses: govuk-heading-m + captionClasses: govuk-table__caption--m firstCellIsHeader: true head: - text: Month you apply diff --git a/packages/govuk-frontend/src/govuk/components/table/template.test.js b/packages/govuk-frontend/src/govuk/components/table/template.test.js index 3a6a66d4fb..aaa61ad85e 100644 --- a/packages/govuk-frontend/src/govuk/components/table/template.test.js +++ b/packages/govuk-frontend/src/govuk/components/table/template.test.js @@ -36,7 +36,7 @@ describe('Table', () => { const $ = render('table', examples['table with head and caption']) const $caption = $('.govuk-table__caption') - expect($caption.hasClass('govuk-heading-m')).toBeTruthy() + expect($caption.hasClass('govuk-table__caption--m')).toBeTruthy() }) })