Skip to content

Conversation

@rmolinares
Copy link
Collaborator

@rmolinares rmolinares commented Jul 14, 2025

Requirements List

  • None

Description List

  • Update Next input button into a submit button on the registration form
  • Enhance date input invalidation message to include dynamic formatting requirement
  • Update the datepicker UI to be closed via the escape key
  • Update the datepicker UI to focus within it on 1 tab key press when initially opened
  • Add aria level controls on all input invalidation messaging to improve Apple VoiceOver experience

Testing List

  • yarn test:unit:all should run without errors or warnings
  • yarn serve should run without errors or warnings
  • yarn build should run without errors or warnings
  • Code review
  • Testing:
    • View the registration page and confirm that the Next button is an input of type="submit"
    • Confirm that the invalidation error message for the date of birth is no longer "Required field" and instead specifies the expected formatting
    • Confirm that the datepicker UI can be closed by pressing esc on the keyboard
    • Confirm that when the datepicker UI is initially opened, you only need to presstab once to begin focus on the first element of the UI
      • Confirm that other existing datepickers still work as expected (license / privilege cards w/ encumber & unencumber, etc)
    • Confirm that Apple VoiceOver experience for invalid error messaging is available
      • Enable in macOS: System Preferences → Accessibility → VoiceOver → Enable VoiceOver
      • The invalidation message should be instantly read once blur away from input / validation functionality triggered
      • When re-visiting invalid input, there should be additional content that you could re-trigger the messaging

Closes #900

Summary by CodeRabbit

  • New Features

    • Enhanced accessibility across all form input components with improved ARIA attributes linking inputs to error and success messages for better screen reader support.
    • Added keyboard accessibility improvements, including Escape key handling and focus management for date inputs.
    • Updated registration forms to use dedicated submit input components for clearer form state management.
  • Bug Fixes

    • Strengthened date validation with strict format enforcement and localized error messages.
    • Ensured Vue reactivity updates are awaited before triggering validation in modal forms for accurate validation states.
  • Documentation

    • Added new date format validation messages to English and Spanish localization files.
  • Tests

    • Added tests verifying date input validation against internal component values and proper error message handling.
  • Chores

    • Centralized date format patterns in configuration for consistent validation across the application.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

## Walkthrough

This update introduces enhanced accessibility features across multiple form input components by adding ARIA attributes and improving error message semantics. It also centralizes date format validation patterns, applies stricter date validation with user-friendly error messages, and updates relevant tests, localization files, and submit button behavior for improved feedback and compliance.

## Changes

| Files/Groups                                                                                      | Change Summary                                                                                                                                                                                                                                     |
|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Input components: InputCheckbox.vue, InputDate.vue, InputEmailList.vue, InputFile.vue, InputPassword.vue, InputPhone.vue, InputRange.vue, InputSelect.vue, InputText.vue, InputTextarea.vue | Added ARIA attributes (`aria-describedby`, `aria-errormessage`, `aria-invalid`) and improved error message spans with IDs, `role="alert"`, and `aria-live="assertive"` for better accessibility.             |
| InputSubmit/InputSubmit.vue                                                                       | Refined conditional rendering of success/error messages; added ARIA roles and dynamic IDs; linked submit input to messages via ARIA attributes for accessibility.                                            |
| Forms/InputDate/InputDate.ts                                                                      | Centralized validation logic, improved keyboard focus handling, added escape key handler, and reorganized code for clarity.                                                                                  |
| Forms/_mixins/form.mixin.ts                                                                       | Added `dateWithFormat` to `joiMessages` for localized, format-specific date validation errors.                                                                                                              |
| LicenseCard.ts, PrivilegeCard.ts, RegisterLicensee.ts                                             | Applied stricter date format validation for relevant form inputs using centralized regex patterns and format-specific error messages; updated mockPopulate to use `await nextTick()` before validation.       |
| RegisterLicensee.vue                                                                             | Switched form submit buttons from `InputButton` to `InputSubmit` and updated bindings accordingly.                                                                                                          |
| app.config.ts                                                                                    | Introduced exported `dateFormatPatterns` object with regexes for `MM/DD/YYYY` and `YYYY-MM-DD` formats.                                                                                                     |
| locales/en.json, locales/es.json                                                                 | Added new localized error message key for invalid date with format.                                                                                                                                          |
| Forms/InputDate/InputDate.spec.ts                                                                | Added test to verify validation uses `localValue` and correct error messages for date input.                                                                                                                |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant InputComponent
    participant ScreenReader

    User->>InputComponent: Enter value (e.g., date, email, etc.)
    InputComponent->>InputComponent: Validate input (using centralized patterns/messages)
    alt Error detected
        InputComponent->>ScreenReader: Announce error via aria attributes (role="alert", aria-live="assertive")
    else Valid input
        InputComponent->>ScreenReader: Announce success or no error
    end

Estimated code review effort

3 (~45 minutes)

Assessment against linked issues

Objective Addressed Explanation
Provide detailed error message when 2-digit birth year is entered (#900) Stricter date format validation with specific error messages for date inputs including birth date.

Suggested reviewers

  • jlkravitz
  • carlsims
  • isabeleliassen

Poem

In fields of forms where errors hide,
A rabbit hops with ARIA as its guide.
Dates now checked, formats tight,
Voices clear for every plight.
With regex and messages that delight,
Accessibility shines, all forms made right!
🐇✨


<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 5d9c34a275451fc0a1937ef12660dfc04c038e6c and f6408ebffa37d312d474104c685e371ff7298051.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `webroot/src/locales/en.json` (1 hunks)
* `webroot/src/locales/es.json` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

* webroot/src/locales/en.json
* webroot/src/locales/es.json

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgAxCnwMGgxaAHoyWEwGEkgAM3wKZhQMT1x0BlzERHg1L3VZUNj7bAFmdRp6OUhsREo/ZnwGjGdpSAAKW0gzAE4AJgB2AEpwwoY+8eSUZl58CXgMIkrq2vrG9DTe/r4SAA9uSngyXNKI2Dz/IiRcKnFtwrFS70WjUEjceAMADWAwAqgBJBS7ZLsZD4fLvPIAYRY3DQYhxGHIYh4SREYg0RgA0iR5NhuKCaMhDgwvNglIxskdDsdcB84gA5e64FoCPAELDbPmfEjfRC/ajwAFFEoEdCtdrqSBi3AS8JZHI8zGlCRoBqMpVYNg1NCk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nHrjgXIyLsf6AgAA== -->

<!-- internal state end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=csg-org/CompactConnect&utm_content=927):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@rmolinares rmolinares requested a review from jsandoval81 July 14, 2025 20:51
Copy link
Collaborator

@jsandoval81 jsandoval81 left a comment

Choose a reason for hiding this comment

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

Nice job - I like the extra focus on a11y 👍

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 15, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
webroot/src/models/FormInput/FormInput.model.ts (1)

142-142: Improve type safety for the altValue parameter.

The altValue parameter is typed as any, which reduces type safety. Consider using a more specific type that matches the expected value types for form inputs.

-    public validate(altValue?: any): void {
+    public validate(altValue?: string | number | boolean | null | Array<File> | Array<string>): void {

This aligns with the value property type defined in the InterfaceFormInput interface (line 22).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92db00b and f92bb4c.

📒 Files selected for processing (2)
  • webroot/src/components/Forms/InputDate/InputDate.ts (6 hunks)
  • webroot/src/models/FormInput/FormInput.model.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • webroot/src/components/Forms/InputDate/InputDate.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: landonshumway-ia
PR: csg-org/CompactConnect#848
File: backend/compact-connect/lambdas/python/provider-data-v1/handlers/registration.py:111-117
Timestamp: 2025-06-17T19:05:36.255Z
Learning: In CompactConnect PR #848, the user landonshumway-ia decided to leave timezone handling code in _should_allow_reregistration function as-is after testing in sandbox environment confirmed it works correctly. The user's reasoning was that reregistration is an edge case, the code has been tested and verified, and AWS is unlikely to change behavior that would break many clients. This represents a pragmatic engineering decision based on testing and risk assessment.
Learnt from: jsandoval81
PR: csg-org/CompactConnect#873
File: webroot/src/styles.common/_inputs.less:115-118
Timestamp: 2025-06-24T00:17:31.188Z
Learning: The team intentionally uses broad CSS selectors like `.dp__input_wrap div { position: static; }` to fix styling issues with the Vue Date-Picker library. They have experience with these styles working well, keep the library version pinned in yarn.lock, and have established processes to re-test everything when updating the library version. This approach is acceptable given their testing discipline and version control.
Learnt from: rmolinares
PR: csg-org/CompactConnect#843
File: webroot/src/components/Forms/InputDate/InputDate.ts:0-0
Timestamp: 2025-06-04T22:04:14.373Z
Learning: In the InputDate component (webroot/src/components/Forms/InputDate/InputDate.ts), immediate validation on every keystroke is intentional design behavior. The team prefers to alert users to encourage expected date format completion rather than deferring validation until the date is complete. This provides immediate feedback to guide users toward proper MM/dd/yyyy format completion.
Learnt from: jsandoval81
PR: csg-org/CompactConnect#922
File: webroot/src/components/UserAccount/UserAccount.ts:0-0
Timestamp: 2025-07-10T19:50:56.706Z
Learning: In the UserAccount component (webroot/src/components/UserAccount/UserAccount.ts), the email field should be disabled for staff users (`isDisabled: this.isStaff`) to maintain existing restrictions, while licensees should be able to change their email address through the new verification process. This is the intended behavior per PR #922 requirements.
Learnt from: jsandoval81
PR: csg-org/CompactConnect#873
File: webroot/src/components/PrivilegeCard/PrivilegeCard.ts:0-0
Timestamp: 2025-06-19T23:43:25.512Z
Learning: In Vue form components, when programmatically setting form input values, it's more efficient to validate just the specific form element being updated (e.g., `formInput.validate()`) rather than calling `validateAll()` on the entire form.
webroot/src/models/FormInput/FormInput.model.ts (2)
Learnt from: jsandoval81
PR: csg-org/CompactConnect#873
File: webroot/src/components/PrivilegeCard/PrivilegeCard.ts:0-0
Timestamp: 2025-06-19T23:43:25.512Z
Learning: In Vue form components, when programmatically setting form input values, it's more efficient to validate just the specific form element being updated (e.g., `formInput.validate()`) rather than calling `validateAll()` on the entire form.
Learnt from: rmolinares
PR: csg-org/CompactConnect#843
File: webroot/src/components/Forms/InputDate/InputDate.ts:0-0
Timestamp: 2025-06-04T22:04:14.373Z
Learning: In the InputDate component (webroot/src/components/Forms/InputDate/InputDate.ts), immediate validation on every keystroke is intentional design behavior. The team prefers to alert users to encourage expected date format completion rather than deferring validation until the date is complete. This provides immediate feedback to guide users toward proper MM/dd/yyyy format completion.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CheckWebroot
🔇 Additional comments (2)
webroot/src/models/FormInput/FormInput.model.ts (2)

145-145: Logic implementation looks correct.

The conditional logic properly determines which value to use for validation - the provided altValue when defined, otherwise falling back to the instance's value property.


148-148: Validation logic correctly uses the determined value.

The validation now properly uses the value variable (which contains either altValue or this.value) instead of always using this.value.

@rmolinares rmolinares requested a review from jsandoval81 July 16, 2025 15:57
Copy link
Collaborator

@jsandoval81 jsandoval81 left a comment

Choose a reason for hiding this comment

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

I'm getting some odd results in UI testing:

  1. When I pick an initial date using the calendar picker, the date populates but the field is marked as error with "Required field"
  2. When I manually enter an invalid date format and correctly trigger the validation error, then use the calendar picker to select a valid date, the error of "Date must be of required format MM/DD/YYYY" remains

Not sure if it's something with the blur event and / or the value change event. The issue happens in both places I tested (registration DOB and encumbrance dates).

Screenshot 2025-07-16 at 10 53 46 AM Screenshot 2025-07-16 at 10 54 01 AM Screenshot 2025-07-16 at 10 55 20 AM

@rmolinares
Copy link
Collaborator Author

@jsandoval81 I had to adjust the input to use the right format value first for validation on initial datepicker update.

It also turns out the solution we came up with to modify existing generic input validation needed a similar but different approach. The solution was working when we were validating individual date inputs but upon form submission the validateAll method is called which iterates through all inputs and validates them via validate. This is not account for the alt validation value so I had to refactor to remove the optional parameter and instead incorporate a new property in the form input model that optionally takes in the alt validation.

It's essentially the same except leveraging the model property itself versus a param. It can also be reused in the future by other inputs if needed. I've also updated the tests and improved the mock data for exists date inputs.

@rmolinares rmolinares requested a review from jsandoval81 July 16, 2025 19:41
@jsandoval81
Copy link
Collaborator

@jlkravitz This is ready for your review.

Copy link
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for working on this.

While testing, I noticed that voiceover/screen readers don't seem to read out the state options on this page:

image

Out of scope here, but just flagging.

@isabeleliassen good to merge!

@isabeleliassen isabeleliassen merged commit 2f2c6f4 into csg-org:development Jul 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provide detailed error message when 2-digit birth year is entered

4 participants