Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-date-time-picker] - Fixed error reading issue in time input #2050

Merged
merged 7 commits into from
Feb 27, 2024

Conversation

PK106552
Copy link
Contributor

Summary

What was changed:

  • Fixed error message and helper text reading in time-input

Why it was changed:

  • Error message and helper text was reading in time-input

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-XXXX


Thank you for contributing to Terra.
@cerner/terra

@saket2403
Copy link
Contributor

saket2403 commented Feb 27, 2024

Can you add a jest test to validate the change

@@ -1092,7 +1092,7 @@ class TimeInput extends React.Component {
size="2"
pattern="\d*"
description={`${hourDescription()}, ${hotKeyDescription}`}
errorId={errorId}
ariaDescribedBy={errorId}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can instead rename ariaDescribedBy prop in accessibleInput to errorId to keep it consistent. Since the description of that prop suggests its only used for err message announcement.

Copy link
Contributor Author

@PK106552 PK106552 Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already i have updated to errorID in date picker and date time picker, but already kadali has added ariaDescribedBy prop in AccessibleInput component to read error message for date input(https://github.com/cerner/terra-framework/pull/1975/files#diff-f42c6c0190bcd6e255f09217576b27f9f78c66c4a407ea440f434bcfa0efb614R30).

Note : Still consumer should pass error id via errorId props only.

@github-actions github-actions bot temporarily deployed to preview-pr-2050 February 27, 2024 09:35 Destroyed
@PK106552
Copy link
Contributor Author

Can you add a jest test to validate the change

Updated

@PK106552 PK106552 requested a review from sugan2416 February 27, 2024 10:27
@rbsree
Copy link

rbsree commented Feb 27, 2024

+1 for Accessibility review, the error message is exposed as expected for both Date and Time Input field.

@sugan2416 sugan2416 merged commit 8fadc9e into main Feb 27, 2024
22 checks passed
@sugan2416 sugan2416 deleted the timeInput_error_issue branch February 27, 2024 11:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants