From 737524b01fd168c080cc77584bbc5c45a30b677a Mon Sep 17 00:00:00 2001
From: rmccar <42928680+rmccar@users.noreply.github.com>
Date: Wed, 6 Nov 2024 08:39:08 +0000
Subject: [PATCH 1/2] Document id param on autosuggest component (#3413)
---
src/components/autosuggest/_macro-options.md | 1 +
src/components/back-to-top/_macro-options.md | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/autosuggest/_macro-options.md b/src/components/autosuggest/_macro-options.md
index f0f0dd6f36..e169e62837 100644
--- a/src/components/autosuggest/_macro-options.md
+++ b/src/components/autosuggest/_macro-options.md
@@ -17,3 +17,4 @@
| resultsTitleId | string | true | ID for the results title. The ID is used in the results `aria-labelledby` to provide context for the results |
| input | `Input` [_(ref)_](/components/input) | true | Configuration object for the input |
| language | string | false | The ISO 639-1 Code will override the default language in page. Please note that only 'en', 'cy' and 'ni' is currently supported |
+| id | string | false | The `id` of the input |
diff --git a/src/components/back-to-top/_macro-options.md b/src/components/back-to-top/_macro-options.md
index aa3f9bcbf0..412c791034 100644
--- a/src/components/back-to-top/_macro-options.md
+++ b/src/components/back-to-top/_macro-options.md
@@ -1,4 +1,4 @@
| Name | Type | Required | Description |
| ----------- | ------ | -------- | -------------------------------------------------------------- |
| description | string | false | The text label added to the button. Defaults to "Back to Top" |
-| anchor | string | false | The 'id' of the element the button jumps to. Defaults to "Top" |
+| anchor | string | false | The `id` of the element the button jumps to. Defaults to "Top" |
From 2bdd1f1eebab601b88c4d8f8ca370a177a47efca Mon Sep 17 00:00:00 2001
From: rmccar <42928680+rmccar@users.noreply.github.com>
Date: Wed, 6 Nov 2024 09:50:43 +0000
Subject: [PATCH 2/2] Fix lighthouse hub and spoke test (#3410)
---
src/components/summary/_macro-options.md | 12 ++++++------
src/components/summary/_macro.njk | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/components/summary/_macro-options.md b/src/components/summary/_macro-options.md
index 52c01010b1..5b468576bb 100644
--- a/src/components/summary/_macro-options.md
+++ b/src/components/summary/_macro-options.md
@@ -53,12 +53,12 @@
## SummaryAction
-| Name | Type | Required | Description |
-| ------------------ | ------ | -------- | ------------------------------------------------------------------------------------------- |
-| text | string | true | Text for the action link |
-| url | string | true | The URL for the HTML `href` attribute of the link used to change the value of the row item |
-| attributes | object | false | HTML attributes (for example, data attributes) to add to the action link |
-| visuallyHiddenText | string | false | Visually hidden text in a span under the action link to add more context for screen readers |
+| Name | Type | Required | Description |
+| ------------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
+| text | string | true | Text for the action link |
+| url | string | true | The URL for the HTML `href` attribute of the link used to change the value of the row item |
+| attributes | object | false | HTML attributes (for example, data attributes) to add to the action link |
+| visuallyHiddenText | string | false | Visually hidden text in a span under the action link to add more context for screen readers, , defaults the text in `text` param |
## SummaryLink
diff --git a/src/components/summary/_macro.njk b/src/components/summary/_macro.njk
index 33ba88d346..8d3708d08d 100644
--- a/src/components/summary/_macro.njk
+++ b/src/components/summary/_macro.njk
@@ -112,10 +112,10 @@
class="ons-summary__button"
{% if action.attributes %}{% for attribute, value in (action.attributes.items() if action.attributes is mapping and action.attributes.items else action.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
>
-
- {{- action.text -}}
-
- {{ action.visuallyHiddenText }}
+ {{- action.text -}}
+ {{ action.visuallyHiddenText | default (action.text) }}
{% endfor %}