Skip to content

Commit

Permalink
Merge pull request #2269 from alphagov/style-guide-fixes
Browse files Browse the repository at this point in the history
Fix style guide issues across macros content
  • Loading branch information
EoinShaughnessy authored Jul 13, 2021
2 parents 6cf0940 + 0de1be5 commit ab705fc
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 84 deletions.
5 changes: 2 additions & 3 deletions src/govuk/components/accordion/accordion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ params:
- name: id
type: string
required: true
description: Must be **unique** across the domain of your service (as the expanded state of individual instances of the component persists across page loads using [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)). Used as an `id` in the HTML for the accordion as a whole, and also as a prefix for the `id`s of the section contents and the buttons that open them, so that those `id`s can be the target of `aria-labelledby` and `aria-control` attributes.
description: Must be unique across the domain of your service (as the expanded state of individual instances of the component persists across page loads using [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)). Used as an `id` in the HTML for the accordion as a whole, and also as a prefix for the `id`s of the section contents and the buttons that open them, so that those `id`s can be the target of `aria-labelledby` and `aria-control` attributes.
- name: headingLevel
type: integer
required: false
description: Heading level, from 1 to 6. Default is `2`.
description: Heading level, from `1` to `6`. Default is `2`.
- name: classes
type: string
required: false
Expand Down Expand Up @@ -203,4 +203,3 @@ examples:
text: Section B
content:
text: Some content

6 changes: 3 additions & 3 deletions src/govuk/components/back-link/back-link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ params:
- name: text
type: string
required: false
description: Text to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to "Back".
description: Text to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to 'Back'.
- name: html
type: string
required: false
description: HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to "Back".
description: HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored. Defaults to 'Back'.
- name: href
type: string
required: true
description: The value of the link href attribute.
description: The value of the link's `href` attribute.
- name: classes
type: string
required: false
Expand Down
12 changes: 6 additions & 6 deletions src/govuk/components/character-count/character-count.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params:
- name: id
type: string
required: true
description: The id of the textarea.
description: The ID of the textarea.
- name: name
type: string
required: true
Expand Down Expand Up @@ -45,12 +45,12 @@ params:
- name: formGroup
type: object
required: false
description: Options for the form-group wrapper
description: Options for the form-group wrapper.
params:
- name: classes
type: string
required: false
description: Classes to add to the form group (for example to show error state for the whole group)
description: Classes to add to the form group (for example to show error state for the whole group).
- name: classes
type: string
required: false
Expand All @@ -62,16 +62,16 @@ params:
- name: spellcheck
type: boolean
required: false
description: Optional field to enable or disable the spellcheck attribute on the character count.
description: Optional field to enable or disable the `spellcheck` attribute on the character count.
- name: countMessage
type: object
required: false
description: Options for the count message
description: Options for the count message.
params:
- name: classes
type: string
required: false
description: Classes to add to the count message
description: Classes to add to the count message.

examples:
- name: default
Expand Down
16 changes: 8 additions & 8 deletions src/govuk/components/checkboxes/checkboxes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ params:
- name: formGroup
type: object
required: false
description: Options for the form-group wrapper
description: Options for the form-group wrapper.
params:
- name: classes
type: string
required: false
description: Classes to add to the form group (for example to show error state for the whole group)
description: Classes to add to the form group (for example to show error state for the whole group).
- name: idPrefix
type: string
required: false
Expand All @@ -51,7 +51,7 @@ params:
- name: id
type: string
required: false
description: Specific id attribute for the checkbox item. If omitted, then component global `idPrefix` option will be applied.
description: Specific ID attribute for the checkbox item. If omitted, then component global `idPrefix` option will be applied.
- name: name
type: string
required: false
Expand All @@ -73,27 +73,27 @@ params:
- name: divider
type: string
required: false
description: Divider text to separate checkbox items, for example the text "or".
description: Divider text to separate checkbox items, for example the text 'or'.
- name: checked
type: boolean
required: false
description: If true, checkbox will be checked.
description: If `true`, checkbox will be checked.
- name: conditional
type: boolean
required: false
description: If true, content provided will be revealed when the item is checked.
description: If `true`, content provided will be revealed when the item is checked.
- name: conditional.html
type: string
required: false
description: Provide content for the conditional reveal.
- name: behaviour
type: string
required: false
description: If set to `exclusive`, implements a "None of these" type behaviour via javascript when checkboxes are clicked
description: If set to `exclusive`, implements a 'None of these' type behaviour via JavaScript when checkboxes are clicked.
- name: disabled
type: boolean
required: false
description: If true, checkbox will be disabled.
description: If `true`, checkbox will be disabled.
- name: attributes
type: object
required: false
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/cookie-banner/cookie-banner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params:
- name: ariaLabel
type: string
required: false
description: The text for the `aria-label` which labels the cookie banner region. This region applies to all messages that the cookie banner includes. For example, the cookie message and the confirmation message. Defaults to "Cookie banner".
description: The text for the `aria-label` which labels the cookie banner region. This region applies to all messages that the cookie banner includes. For example, the cookie message and the confirmation message. Defaults to 'Cookie banner'.
- name: hidden
type: boolean
required: false
Expand Down
10 changes: 5 additions & 5 deletions src/govuk/components/date-input/date-input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params:
- name: id
type: string
required: true
description: This is used for the main component and to compose id attribute for each item.
description: This is used for the main component and to compose the ID attribute for each item.
- name: namePrefix
type: string
required: false
Expand All @@ -15,7 +15,7 @@ params:
- name: id
type: string
required: false
description: Item-specific id. If provided, it will be used instead of the generated id.
description: Item-specific ID. If provided, it will be used instead of the generated ID.
- name: name
type: string
required: true
Expand All @@ -31,7 +31,7 @@ params:
- name: autocomplete
type: string
required: false
description: Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance "bday-day". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used.
description: Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance `bday-day`. See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used.
- name: pattern
type: string
required: false
Expand All @@ -57,12 +57,12 @@ params:
- name: formGroup
type: object
required: false
description: Options for the form-group wrapper
description: Options for the form-group wrapper.
params:
- name: classes
type: string
required: false
description: Classes to add to the form group (for example to show error state for the whole group)
description: Classes to add to the form group (for example to show error state for the whole group).
- name: fieldset
type: object
required: false
Expand Down
4 changes: 2 additions & 2 deletions src/govuk/components/details/details.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ params:
- name: id
type: string
required: false
description: Id to add to the details element.
description: ID to add to the details element.
- name: open
type: boolean
required: false
description: If true, details element will be expanded.
description: If `true`, details element will be expanded.
- name: classes
type: string
required: false
Expand Down
6 changes: 3 additions & 3 deletions src/govuk/components/error-message/error-message.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ params:
- name: id
type: string
required: false
description: Id attribute to add to the error message span tag.
description: ID attribute to add to the error message span tag.
- name: classes
type: string
required: false
description: Classes to add to the error message span tag.
- name: attributes
type: object
required: false
description: HTML attributes (for example data attributes) to add to the error message span tag
description: HTML attributes (for example data attributes) to add to the error message span tag.
- name: visuallyHiddenText
type: string
required: false
description: A visually hidden prefix used before the error message. Defaults to "Error".
description: A visually hidden prefix used before the error message. Defaults to 'Error'.

accessibilityCriteria: |
When used with a single input, the error message MUST:
Expand Down
8 changes: 4 additions & 4 deletions src/govuk/components/file-upload/file-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ params:
- name: id
type: string
required: true
description: The id of the input
description: The ID of the input.
- name: value
type: string
required: false
description: Optional initial value of the input
description: Optional initial value of the input.
- name: describedBy
type: string
required: false
Expand All @@ -33,12 +33,12 @@ params:
- name: formGroup
type: object
required: false
description: Options for the form-group wrapper
description: Options for the form-group wrapper.
params:
- name: classes
type: string
required: false
description: Classes to add to the form group (for example to show error state for the whole group)
description: Classes to add to the form group (for example to show error state for the whole group).
- name: classes
type: string
required: false
Expand Down
4 changes: 2 additions & 2 deletions src/govuk/components/footer/footer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: visuallyHiddenTitle
type: string
required: false
description: Title for a meta item section, which defaults to Support links
description: Title for a meta item section. Defaults to 'Support links'.
- name: html
type: string
required: false
Expand Down Expand Up @@ -41,7 +41,7 @@ params:
- name: title
type: string
required: true
description: Title for a section
description: Title for a section.
- name: columns
type: integer
required: false
Expand Down
12 changes: 6 additions & 6 deletions src/govuk/components/header/header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ params:
- name: homepageUrl
type: string
required: false
description: The url of the homepage. Defaults to /
description: The URL of the homepage. Defaults to `/`
- name: assetsPath
type: string
required: false
description: The public path for the assets folder. If not provided it defaults to /assets/images
- name: productName
type: string
required: false
description: Product name, used when the product name follows on directly from ‘GOV.UK’. For example, GOV.UK Pay or GOV.UK Design System. In most circumstances, you should use serviceName.
description: Product name, used when the product name follows on directly from ‘GOV.UK’. For example, GOV.UK Pay or GOV.UK Design System. In most circumstances, you should use `serviceName`.
- name: serviceName
type: string
required: false
description: The name of your service, included in the header.
- name: serviceUrl
type: string
required: false
description: Url for the service name anchor.
description: URL for the service name anchor.
- name: navigation
type: array
required: false
Expand All @@ -35,7 +35,7 @@ params:
- name: href
type: string
required: false
description: Url of the navigation item anchor.
description: URL of the navigation item anchor.
- name: active
type: boolean
required: false
Expand All @@ -51,11 +51,11 @@ params:
- name: navigationLabel
type: string
required: false
description: Text for the `aria-label` attribute of the navigation. Defaults to "Navigation menu".
description: Text for the `aria-label` attribute of the navigation. Defaults to 'Navigation menu'.
- name: menuButtonLabel
type: string
required: false
description: Text for the `aria-label` attribute of the button that toggles the navigation. Defaults to "Show or hide navigation menu".
description: Text for the `aria-label` attribute of the button that toggles the navigation. Defaults to 'Show or hide navigation menu'.
- name: containerClasses
type: string
required: false
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/hint/hint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ params:
- name: id
type: string
required: false
description: Optional id attribute to add to the hint span tag.
description: Optional ID attribute to add to the hint span tag.
- name: classes
type: string
required: false
Expand Down
14 changes: 7 additions & 7 deletions src/govuk/components/input/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ params:
- name: id
type: string
required: true
description: The id of the input.
description: The ID of the input.
- name: name
type: string
required: true
description: The name of the input, which is submitted with the form data.
- name: type
type: string
required: false
description: Type of input control to render. Defaults to "text".
description: Type of input control to render. Defaults to `text`.
- name: inputmode
type: string
required: false
Expand Down Expand Up @@ -67,11 +67,11 @@ params:
- name: text
type: string
required: true
description: Required. If `html` is set, this is not required. Text to use within the label. If `html` is provided, the `text` argument will be ignored.
description: If `html` is set, this is not required. Text to use within the label. If `html` is provided, the `text` argument will be ignored.
- name: html
type: string
required: true
description: Required. If `text` is set, this is not required. HTML to use within the label. If `html` is provided, the `text` argument will be ignored.
description: If `text` is set, this is not required. HTML to use within the label. If `html` is provided, the `text` argument will be ignored.
- name: classes
type: string
required: false
Expand All @@ -83,12 +83,12 @@ params:
- name: formGroup
type: object
required: false
description: Options for the form-group wrapper
description: Options for the form-group wrapper.
params:
- name: classes
type: string
required: false
description: Classes to add to the form group (for example to show error state for the whole group)
description: Classes to add to the form group (for example to show error state for the whole group).
- name: classes
type: string
required: false
Expand All @@ -104,7 +104,7 @@ params:
- name: spellcheck
type: boolean
required: false
description: Optional field to enable or disable the spellcheck attribute on the input.
description: Optional field to enable or disable the `spellcheck` attribute on the input.
- name: attributes
type: object
required: false
Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/inset-text/inset-text.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ params:
- name: id
type: string
required: false
description: Id attribute to add to the inset text container.
description: ID attribute to add to the inset text container.
- name: classes
type: string
required: false
Expand Down
Loading

0 comments on commit ab705fc

Please sign in to comment.