mi6 / mi6/ic-ui-kit

[ic-date-input/picker]: Add 'hideHelperText' prop

Open
#1,728 2 comments 0 reactions 1 assignee View on GitHub

@GCHQ-Developer-299 is already working on this.

Since Aug 7, 2024.

Date input good first issue
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary
By default, the date input/picker displays helper text'. This ticket is to create a prop which removes the helper text.

## 💬 Description
By default, the date input/picker displays helper text'. Some designs may not require help text as the placeholders for picker/input present the required format. If custom helper text is required, there is no need to remove the helper text. The solution is to create a simple 'hideHelperText' prop to hide it.

In terms of a11y, the format is announced by screen readers so there should not be an issue. The announcement is made via labelledby so it may be better to add 'sr-only' class to the helper text instead of removing the element from the DOM.

## 💰 Use value
Add extra flexibility to the visual for input/picker as some designs may not use helper text for form controla.

## 📝 Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

*Given as a developer*
*When I set 'hideHelperText' prop to true*
*Then the helper text should disappear visually but still be read out by screen readers*

## ✏ Designs
N/A

## 🧾 Guidance
N/A

## Additional info
The helper text within the doc returns 'undefined' as the custom helper text value. This needs to be changed to 'Use format '. This is a small update which can be added to this ticket.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.