Sha256: fc376301536e019625124b2c1be6ee3f5b99e953c4b9b00135878a55d45e96ed

Contents?: true

Size: 1.28 KB

Versions: 27

Compression:

Stored size: 1.28 KB

Contents

name: Form label
description: Use labels for all form fields.
body: |
  For use with other form inputs e.g. [Radio buttons](/component-guide/radio)

  Forked from the upcoming [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), when GOV.UK Frontend release we can replace these source files.
accessibility_criteria: |
  - have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
  - have visible text
  - `hint_id` is matched with an `aria-describedby` property on the input your label is associated with.
examples:
  default:
    data:
      text: "National Insurance number"
      html_for: "id-that-matches-input"
  with_hint:
    data:
      text: "National Insurance number"
      html_for: "id-that-matches-input"
      hint_id: "should-match-aria-describedby-input"
      hint_text: "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
  bold_with_hint:
    data:
      bold: true
      text: "National Insurance number"
      html_for: "id-that-matches-input"
      hint_id: "should-match-aria-describedby-input-bold"
      hint_text: "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
govuk_publishing_components-5.7.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.6.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.6 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.5 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.4 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.3 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.2 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.1 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.5.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.4.1 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.4.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.3.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.2.3 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.2.2 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.2.1 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.2.0 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.1.3 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.1.2 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.1.1 app/views/govuk_publishing_components/components/docs/label.yml
govuk_publishing_components-5.1.0 app/views/govuk_publishing_components/components/docs/label.yml