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

VACMS-17863: Adds validation to ext field in phone paragraph. #20651

Merged
merged 25 commits into from
Mar 4, 2025

Conversation

dsasser
Copy link
Contributor

@dsasser dsasser commented Feb 21, 2025

Description

Adds numeric validator and applies it to the extension field of the phone paragraph.

Also adds "input mask" for the extension field to ensure that only numbers (and some control characters) can be entered.

Relates to #17863

Testing done

Manual
Cypress
Unit

Screenshots

Screenshot 2025-02-19 at 12 22 03 PM

QA steps

Validate extension input mask when creating a new phone number:
As Content Admin

Validate extension input mask when editing an existing phone number:

Validate backend validation on extension field:

  • Visit https://pr20651-ip9zgupiitvyfskhuiqm7kc688wxuhp3.ci.cms.va.gov/node/add/person_profile
  • Fill out required fields
  • Click the 'Add phone number' link in the Contact Info section
  • Type a valid phone number
  • Copy this extension to your clipboard x1234
  • In the 'Extension number', right click and PASTE the extension into the 'Extension number' field
  • Validate you see x1234 in the 'Extension number' field
  • Save the form
  • Validate you get the error message '1 error has been found: Extension number'
  • Scroll down to the 'Extension number' field
  • Validate you see the error message 'Enter an extension that contains only numeric characters (0-9).' under the 'Extension number' field.
  • Validate that the 'Extension number' field has a red border
  • Validate 'Extension number' is in red.

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

Is this PR blocked by another PR?

Blocked by #20611

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2025 18:30 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2025 18:46 Destroyed
Copy link

Checking composer.lock changes...

Copy link

GitHub Workflows (.github/workflows/*.yml)

Have you...

  • pinned all affected GitHub Actions at a specific commit by SHA?
  • reviewed the source code of the action at the commit you are pinning?
  • confirmed that no GitHub security measures are being bypassed?
  • checked for any injection of user content into protected contexts?
  • reviewed Security hardening for GitHub Actions?
  • reviewed GitHub Workflows?

@github-actions github-actions bot added DO NOT MERGE Do not merge this PR Facilities Facilities products (VAMC, Vet Center, etc) labels Feb 21, 2025
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2025 19:31 Destroyed
Copy link

Checking composer.lock changes...

…' of github.com:department-of-veterans-affairs/va.gov-cms into VACMS-17863-add-validation-ext-field-in-phone-paragraph
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2025 20:40 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2025 21:05 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 22, 2025 08:49 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 23, 2025 08:49 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 24, 2025 08:54 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 25, 2025 08:46 Destroyed
Copy link

Checking composer.lock changes...

Copy link
Contributor

@omahane omahane left a comment

Choose a reason for hiding this comment

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

Tabbing like crazy! Perfect.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 27, 2025 08:35 Destroyed
@Shamiaalam
Copy link

@dsasser I run through screen reader, key board navigation. and some other A11y test with requirements! Also keyboard tabbing is perfectly fine. Approved ✅

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 00:08 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 08:36 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 17:58 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 20:43 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 1, 2025 08:36 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 2, 2025 08:37 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 3, 2025 08:35 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 3, 2025 16:47 Destroyed
Copy link

github-actions bot commented Mar 3, 2025

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 4, 2025 08:37 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 4, 2025 16:36 Destroyed
Copy link

github-actions bot commented Mar 4, 2025

Checking composer.lock changes...

@va-cms-bot
Copy link
Collaborator

Cypress Accessibility Violations

/test-data-aut

ID: button-name
Impact: critical
Tags: cat.name-role-value, wcag2a, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.4.1.2, ACT
Description: Ensure buttons have discernible text
Help: Buttons must have discernible text
Nodes:

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Page introduction' field" data-proofing-help="Add an introduction that helps visitors understand if information on the page is relevant to them."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: .field--name-field-intro-text-limited-html > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Generate a table of contents from major headings' field" data-proofing-help="By checking this box, all h2's below this point on the page will be linked with with anchor links. This helps users navigate content on very long pages. Do not check this box unless there is at least 2 h2's on the page.">
    Impact: critical
    Target: .field--name-field-table-of-contents-boolean > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Main content' field" data-proofing-help="The main body of the page, which appears below the featured content."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: button[data-proofing-help-title="About 'Main content' field"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

@dsasser dsasser merged commit a773e9b into main Mar 4, 2025
18 checks passed
@dsasser dsasser deleted the VACMS-17863-add-validation-ext-field-in-phone-paragraph branch March 4, 2025 17:43
@dsasser dsasser removed the DO NOT MERGE Do not merge this PR label Mar 4, 2025
@dsasser
Copy link
Contributor Author

dsasser commented Mar 4, 2025

Christian let us know that the blocker for this PR, his phone extension migration scripts, have been run on prod so were are safe to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Facilities Facilities products (VAMC, Vet Center, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants