Skip to content

Commit

Permalink
Merge pull request #3919 from alphagov/nested-option
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Aug 4, 2023
2 parents 6b4c528 + d8e453f commit 215eac2
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 62 deletions.
57 changes: 36 additions & 21 deletions src/govuk/components/accordion/accordion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,45 @@ params:
required: true
description: An array of sections within the accordion.
params:
- name: heading.text
type: string
- name: heading
type: object
required: true
description: The title of each section. If `heading.html` is supplied, this is ignored.
- name: heading.html
type: string
required: true
description: The HTML content of the header for each section. Used as the title for each section. The header is inside the HTML `<button>` element, so you can only add [phrasing content](https://html.spec.whatwg.org/#phrasing-content) to it.
- name: summary.text
type: string
required: false
description: Text content for summary line. If `summary.html` is supplied, this is ignored.
- name: summary.html
type: string
description: The heading of each section.
params:
- name: text
type: string
required: true
description: If `html` is set, this is not required. The heading text of each section. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. The heading HTML content of each section. The header is inside the HTML `<button>` element, so you can only add [phrasing content](https://html.spec.whatwg.org/#phrasing-content) to it. If `html` is provided, the `text` option will be ignored.
- name: summary
type: object
required: false
description: The HTML content for the summary line. The summary line is inside the HTML `<button>` element, so you can only add [phrasing content](https://html.spec.whatwg.org/#phrasing-content) to it.
- name: content.text
type: string
required: true
description: The text content of each section, which is hidden when the section is closed. If `content.html` is supplied, this is ignored.
- name: content.html
type: string
description: The summary line of each section.
params:
- name: text
type: string
required: false
description: The summary line text content of each section. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: false
description: The summary line HTML content of each section. The summary line is inside the HTML `<button>` element, so you can only add [phrasing content](https://html.spec.whatwg.org/#phrasing-content) to it. If `html` is provided, the `text` option will be ignored.
- name: content
type: object
required: true
description: The HTML content of each section, which is hidden when the section is closed.
description: The content of each section.
params:
- name: text
type: string
required: true
description: If `html` is set, this is not required. The text content of each section, which is hidden when the section is closed. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. The HTML content of each section, which is hidden when the section is closed. If `html` is provided, the `text` option will be ignored.
- name: expanded
type: boolean
required: false
Expand Down
97 changes: 56 additions & 41 deletions src/govuk/components/summary-list/summary-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,78 @@ params:
type: string
required: false
description: Classes to add to the row `div`.
- name: key.text
type: string
required: true
description: If `html` is set, this is not required. Text to use within each key. If `html` is provided, the `text` option will be ignored.
- name: key.html
type: string
required: true
description: If `text` is set, this is not required. HTML to use within each key. If `html` is provided, the `text` option will be ignored.
- name: key.classes
type: string
required: false
description: Classes to add to the key wrapper.
- name: value.text
type: string
required: true
description: If `html` is set, this is not required. Text to use within each value. If `html` is provided, the `text` option will be ignored.
- name: value.html
type: string
- name: key
type: object
required: true
description: If `text` is set, this is not required. HTML to use within each value. If `html` is provided, the `text` option will be ignored.
- name: value.classes
type: string
required: false
description: Classes to add to the value wrapper.
- name: actions.classes
type: string
required: false
description: Classes to add to the actions wrapper.
- name: actions.items
type: array
required: false
description: Array of action item objects.
description: The key of each row.
params:
- name: href
- name: text
type: string
required: true
description: If `html` is set, this is not required. Text to use within each key. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: true
description: The value of the link's `href` attribute for an action item.
description: If `text` is set, this is not required. HTML to use within each key. If `html` is provided, the `text` option will be ignored.
- name: classes
type: string
required: false
description: Classes to add to the key wrapper.
- name: value
type: object
required: true
description: The value of each row.
params:
- name: text
type: string
required: true
description: If `html` is set, this is not required. Text to use within each action item. If `html` is provided, the `text` option will be ignored.
description: If `html` is set, this is not required. Text to use within each value. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. HTML to use within each action item. If `html` is provided, the `text` option will be ignored.
- name: visuallyHiddenText
description: If `text` is set, this is not required. HTML to use within each value. If `html` is provided, the `text` option will be ignored.
- name: classes
type: string
required: false
description: Actions rely on context from the surrounding content so may require additional accessible text. Text supplied to this option is appended to the end. Use `html` for more complicated scenarios.
description: Classes to add to the value wrapper.
- name: actions
type: object
required: false
description: The actions of each row.
params:
- name: classes
type: string
required: false
description: Classes to add to the action item.
- name: attributes
type: object
description: Classes to add to the actions wrapper.
- name: items
type: array
required: false
description: HTML attributes (for example data attributes) to add to the action item.
description: Array of action item objects.
params:
- name: href
type: string
required: true
description: The value of the link's `href` attribute for an action item.
- name: text
type: string
required: true
description: If `html` is set, this is not required. Text to use within each action item. If `html` is provided, the `text` option will be ignored.
- name: html
type: string
required: true
description: If `text` is set, this is not required. HTML to use within each action item. If `html` is provided, the `text` option will be ignored.
- name: visuallyHiddenText
type: string
required: false
description: Actions rely on context from the surrounding content so may require additional accessible text. Text supplied to this option is appended to the end. Use `html` for more complicated scenarios.
- name: classes
type: string
required: false
description: Classes to add to the action item.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the action item.
- name: card
type: object
required: false
Expand Down

0 comments on commit 215eac2

Please sign in to comment.