Skip to content

Radios component issues #31

@danielelder

Description

@danielelder

The govRadios component has the following issues:

  • The fieldset hint text contains the hard coded id 'changed-name-hint' which links to the aria-describedby attribute on the fieldset. Although generally you would only have one set of radios on a page, there may be occasions when multiple sets of checkboxes are required. The hard coded id would prevent the ability to do this as the aria-describedby value would be invalid, causing difficulties for screen reader users to understand its purpose.
  • If an error message is present a reference should be added to the fieldset aria-describedby attribute.
  • The legend has been implemented as a label and links to a non-existing form input id using the for attribute. Remove the label element completely from inside the legend element.
  • The legend currently has to be a heading, add support for plain text as it's not always preferable for it to be a heading.
  • Currently the heading sizes (H1, H2, H3) are tied to visual style classes, this reduces the flexibility of the component. For example, if a long heading that is defined as H1 looks overly large, content designers will reduce the size using the css classes to make it more readable. Split the Heading size and visual size up so they can be used in any combination to create the best experience.
  • Hard coded "error:" prefix does not allow for language translations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions