hmrc / platui-support

Apache License 2.0
0 stars 0 forks source link

Character Count component - no red outline for empty submission #19

Closed jackheslop96 closed 2 years ago

jackheslop96 commented 2 years ago

Library or service name

play-frontend-hmrc

Library version (where applicable)

The frontend in question is currently using 3.8.0-play-28 but I have bumped that up locally to the latest version (3.21.0-play-28) and the issue still persists.

Description of the issue

The character count component displays a red outline on the input when the maximum number of characters is exceeded, but not for a form error (interestingly, the red outline is displayed for a form error when javascript is disabled).

Steps to reproduce the issue

Trigger a form error for a character count input (e.g. an empty submission). Here is a link to our implementation of the component - https://github.com/hmrc/manage-transit-movements-cancellation-frontend/blob/main/app/views/components/InputCharacterCount.scala.html

Screenshot 2022-06-08 at 16 16 25

Actual vs expected behaviour

The outline of the input remains black when it should be red.

Environment (where applicable)

kyle-bowden commented 2 years ago

This behavior is intended https://github.com/alphagov/govuk-frontend/issues/1858