diff --git a/src/components/header/example-header-external-welsh.njk b/src/components/header/example-header-external-welsh.njk index 56bd610dd6..2fecc27804 100644 --- a/src/components/header/example-header-external-welsh.njk +++ b/src/components/header/example-header-external-welsh.njk @@ -1,6 +1,7 @@ --- fullWidth: true --- + {% from "components/header/_macro.njk" import onsHeader %} {{ diff --git a/src/components/radios/_macro.njk b/src/components/radios/_macro.njk index 3a34585cd8..a0dfb8390d 100644 --- a/src/components/radios/_macro.njk +++ b/src/components/radios/_macro.njk @@ -35,7 +35,8 @@ name="{{ params.name }}" {% if radio.checked or (params.value is defined and params.value == radio.value) %}{{ ' ' }}checked{% endif %} {% if radio.other and not radio.other.open %} - {{ ' ' }}aria-controls="{{ radio.id }}-other-wrap" aria-haspopup="true" + {{ ' ' }}aria-controls="{{ radio.id }}-other-wrap" + aria-haspopup="true" {% endif %} {% if radio.attributes %}{% for attribute, value in (radio.attributes.items() if radio.attributes is mapping and radio.attributes.items else radio.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %} /> diff --git a/src/components/timeline/_macro-options.md b/src/components/timeline/_macro-options.md index c5c7ac436a..d4a7de1cf6 100644 --- a/src/components/timeline/_macro-options.md +++ b/src/components/timeline/_macro-options.md @@ -1,8 +1,8 @@ -| Name | Type | Required | Description | -| -------- | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | -| classes | string | false | Classes to add to the component | -| titleTag | string | false | The HTML heading tag to wrap the title text in for it’s correct semantic order on the page. Will default to an `h2`. | -| items | array`` | true | An array of [timeline items](#timelineitems) | +| Name | Type | Required | Description | +| ------------- | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | +| classes | string | false | Classes to add to the component | +| titleTag | string | false | The HTML heading tag to wrap the title text in for it’s correct semantic order on the page. Will default to an `h2`. | +| timelineItems | array`` | true | An array of [timeline items](#timelineitems) | ## TimelineItems diff --git a/src/components/timeline/_macro.njk b/src/components/timeline/_macro.njk index f50742f783..2b529775b2 100644 --- a/src/components/timeline/_macro.njk +++ b/src/components/timeline/_macro.njk @@ -5,7 +5,7 @@ {% set titleTag = params.titleTag | default("h2") %} {% set openingTag = "<" + titleTag %} {% set closingTag = "" %} - {% for item in params.items %} + {% for item in params.timelineItems %}
{{ openingTag | safe }} class="ons-timeline__heading">{{ item.heading }}{{ closingTag | safe }} {% if item.itemsList %} diff --git a/src/components/timeline/_macro.spec.js b/src/components/timeline/_macro.spec.js index 63f46bd9e4..f9b8d1e3ca 100644 --- a/src/components/timeline/_macro.spec.js +++ b/src/components/timeline/_macro.spec.js @@ -6,7 +6,7 @@ import axe from '../../tests/helpers/axe'; import { renderComponent, templateFaker } from '../../tests/helpers/rendering'; const EXAMPLE_TIMELINE = { - items: [ + timelineItems: [ { heading: 'January 2020', content: 'Timeline entry 1', diff --git a/src/components/timeline/example-timeline.njk b/src/components/timeline/example-timeline.njk index 5e5bd8d88b..1e9a133bd6 100644 --- a/src/components/timeline/example-timeline.njk +++ b/src/components/timeline/example-timeline.njk @@ -2,7 +2,7 @@ {{ onsTimeline({ - "items": [ + "timelineItems": [ { "heading": 'September to October 2020', "itemsList": [