Skip to content

Commit

Permalink
Merge branch 'main' into fix-flakey-macro-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar authored Nov 6, 2024
2 parents c1c96f1 + 2bdd1f1 commit aea36f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/components/summary/_macro-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/components/summary/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
>
<span class="ons-summary__button-text" aria-hidden="true">
{{- action.text -}}
</span>
<span class="ons-u-vh">{{ action.visuallyHiddenText }}</span>
<span class="ons-summary__button-text" aria-hidden="true">{{- action.text -}}</span>
<span class="ons-u-vh"
>{{ action.visuallyHiddenText | default (action.text) }}</span
>
</a>
{% endfor %}
</dd>
Expand Down

0 comments on commit aea36f3

Please sign in to comment.