Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOPID-2107] - A11Y TextInputBase accessibility improvement #327

Merged
merged 7 commits into from
Aug 30, 2024

Conversation

ChrisMattew
Copy link
Collaborator

@ChrisMattew ChrisMattew commented Aug 28, 2024

Short description

Added accessibilityHint when prop status is equal to "error", improve TextInputValidation's error announce feature.

List of changes proposed in this pull request

  • TextInputBase: added accessibilityHint property
  • TextInputValidation: added possibility to customize error message on input validation, in case of custom validation error messages

How to test

Using a physical device, enable the screen reader and target an input with an error status; its error message should be announced. Now, in the case of dynamic error messages, it’s possible to pass them through the validation function in order to announce them properly.

@ChrisMattew ChrisMattew requested review from dmnplb and a team as code owners August 28, 2024 14:52
@ChrisMattew ChrisMattew self-assigned this Aug 28, 2024
@ChrisMattew ChrisMattew requested a review from Ladirico August 28, 2024 14:52
@ChrisMattew ChrisMattew marked this pull request as draft August 29, 2024 09:18
…n in order to fix the case in which the message announced from the screen reader was not properly updated
@ChrisMattew ChrisMattew requested a review from CrisTofani August 29, 2024 14:58
@ChrisMattew ChrisMattew added bug Something isn't working a11y labels Aug 29, 2024
@ChrisMattew ChrisMattew marked this pull request as ready for review August 29, 2024 14:59
Copy link
Contributor

@CrisTofani CrisTofani left a comment

Choose a reason for hiding this comment

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

new validation logic sounds ok, anyway I have some concerns

src/components/textInput/TextInputBase.tsx Outdated Show resolved Hide resolved
@ChrisMattew ChrisMattew requested a review from CrisTofani August 30, 2024 08:39
Copy link
Contributor

@Ladirico Ladirico left a comment

Choose a reason for hiding this comment

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

LGTM!

@Ladirico Ladirico merged commit b506847 into main Aug 30, 2024
6 checks passed
@Ladirico Ladirico deleted the IOPID-2107-a11y-TextInputBase-focus branch August 30, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants