From a96779c403c77c7327bfdb47c8dd609583a35800 Mon Sep 17 00:00:00 2001 From: Precious Onyenaucheya <86783201+precious-onyenaucheya-ons@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:54:24 +0000 Subject: [PATCH] Update tags to headings in section navigation component (#2964) * implement and approve visual tests * update macro * update macro * address PR comments * update css file * update macro * update visual test --- ...th-timeout-warning_0_document_1_tablet.png | 4 ++-- src/components/pagination/_macro-options.md | 17 ++++++------- src/components/section-navigation/_macro.njk | 24 ++++++++++++++----- .../_section-navigation.scss | 22 +++++++++++++++-- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/backstop_data/bitmaps_reference/ds-vr-test__components_timeout-panel_example-panel-with-timeout-warning_0_document_1_tablet.png b/backstop_data/bitmaps_reference/ds-vr-test__components_timeout-panel_example-panel-with-timeout-warning_0_document_1_tablet.png index 38d3cec173..e57dee7bd7 100644 --- a/backstop_data/bitmaps_reference/ds-vr-test__components_timeout-panel_example-panel-with-timeout-warning_0_document_1_tablet.png +++ b/backstop_data/bitmaps_reference/ds-vr-test__components_timeout-panel_example-panel-with-timeout-warning_0_document_1_tablet.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255ba5261f88e83a8fb612ac518ba06379e3d196a20b65f9d17e2b856fe84124 -size 13594 +oid sha256:8cb52531d1d281043cf0541c3c8d2a5b93bbc00c3d2a60d1244b4949a954c265 +size 13505 diff --git a/src/components/pagination/_macro-options.md b/src/components/pagination/_macro-options.md index 47166c3a75..11d39e654b 100644 --- a/src/components/pagination/_macro-options.md +++ b/src/components/pagination/_macro-options.md @@ -1,11 +1,12 @@ -| Name | Type | Required | Description | -| ------------------ | ------------- | -------- | ------------------------------------------------------------------ | -| pages | `Array` | true | Settings for each [page](#page) | -| currentPageNumber | integer | true | Sets the current page number | -| previous | string | false | Text label for the “Previous” link. Default is "Previous". | -| next | string | false | Text label for the “Next” link. Default is "Next". | -| classes | string | false | Classes to add to the pagination HTML `nav` element | -| hideRangeIndicator | boolean | false | Set to “true” to hide the range indicator on viewports ≥ 740px | +| Name | Type | Required | Description | +| ------------------ | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | +| pages | `Array` | true | Settings for each [page](#page) | +| currentPageNumber | integer | true | Sets the current page number | +| previous | string | false | Text label for the “Previous” link. Default is "Previous". | +| next | string | false | Text label for the “Next” link. Default is "Next". | +| classes | string | false | Classes to add to the pagination HTML `nav` element | +| hideRangeIndicator | boolean | false | Set to “true” to hide the range indicator on viewports ≥ 740px | +| headingLevel | string | false | Number used to determine the heading level to ensure it has the correct semantic order on the page. Defaults to `2` | ## Page diff --git a/src/components/section-navigation/_macro.njk b/src/components/section-navigation/_macro.njk index bab97f4136..ae542c92a1 100644 --- a/src/components/section-navigation/_macro.njk +++ b/src/components/section-navigation/_macro.njk @@ -1,11 +1,14 @@ {% macro onsSectionNavigation(params) %} + {% set headingLevel = params.headingLevel | int | default(2) %} + {% set sectionTitleHeadingLevel = headingLevel + 1 %}