diff --git a/src/components/summary/_macro-options.md b/src/components/summary/_macro-options.md index 5b468576bb..06f0cc030f 100644 --- a/src/components/summary/_macro-options.md +++ b/src/components/summary/_macro-options.md @@ -36,6 +36,7 @@ | Name | Type | Required | Description | | ---------------------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------- | +| id | string | false | `id` of the action links | | iconType | string | false | Adds an icon before the row title, by setting the [icon type](/foundations/icons#icon-type) | | iconVisuallyHiddenText | string | false | Visually hidden text in a span under the icon to add more context for screen readers | | title | string | false | The title for the row item | diff --git a/src/components/summary/_macro.njk b/src/components/summary/_macro.njk index 8d3708d08d..e9d8db8369 100644 --- a/src/components/summary/_macro.njk +++ b/src/components/summary/_macro.njk @@ -104,7 +104,7 @@ {% endif %} {% if item.actions %} -
+
{% for action in item.actions %} {% if loop.index > 1 %}{% endif %} { ).toBe('Action 2'); }); + it('has the correct `id` added to the actions', () => { + const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC)); + + expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__actions').attr('id')).toBe('item-id-2'); + }); + it('has the correct visually hidden text', () => { const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));