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

VAGOV-TEAM-96557: Default paragraphs #20382

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

ryguyk
Copy link
Contributor

@ryguyk ryguyk commented Jan 31, 2025

Description

This adds a "Your personal information" chapter to a Digital Form when the form is first created using Form Builder UI. The chapter includes two sub-chapters ("Name and date of birth" and "Identification information").

Closes department-of-veterans-affairs/va.gov-team#96557

Testing done

  • Functional test updated. Confirms that default paragraph with sub-paragraphs exists after initial node creation.
  • Manually tested as well.

Screenshots

Admin view after creating form in Form Builder:
image

QA steps

As ad admin:

  1. Navigate to /form-builder/form-info.
    • Fill in form and click "Save and continue".
    • Validate that you are redirected to form-builder/{nid}/layout.
  2. On the Layout page.
    • Validate that the "Your personal information" step has "COMPLETE" status with green label.
    • Copy the nid value and manually navigate to /node/{nid}/edit.
  3. On the default/admin node-edit page:
    • Validate that the form has a "Your personal information" chapter.
    • Validate that the chapter contains two sub-chapters:
      • "Name and date of birth"
      • "Identification information"

Definition of Done

  • Documentation has been updated, if applicable.
  • [ x 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
  • Form Engine

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

ryguyk added 21 commits January 30, 2025 13:52
- routing
- controller method
- theme definition
- template
- css
- Complete/incomplete status tags appear but are not accurate.
- Steps 1-3 are hard-coded (subject to change).
- Calculates status for each step and passes to template.
- Displays status on template according to passed-in values.
- Moves some logic from DigitalFormsService into the DigitalForm wrapper class to be more OOP.
…urning value.

- Updates test to check for this behavior.
- Adds functional test for Layout page.
@ryguyk ryguyk requested a review from a team as a code owner January 31, 2025 23:18
@va-cms-bot va-cms-bot temporarily deployed to Tugboat January 31, 2025 23:18 Destroyed
@ryguyk ryguyk requested a review from derekhouck January 31, 2025 23:18
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 1, 2025 08:50 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 2, 2025 08:48 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 3, 2025 08:53 Destroyed
@ryguyk ryguyk force-pushed the VAGOV-TEAM-96557-default-paragraphs branch from 05def22 to dd04e63 Compare February 3, 2025 20:26
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 3, 2025 20:26 Destroyed
Copy link

github-actions bot commented Feb 3, 2025

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 4, 2025 08:51 Destroyed
@va-cms-bot
Copy link
Collaborator

Cypress Accessibility Violations

/test-data-laudantium

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"

/node/add/campaign_landing_page

ID: color-contrast
Impact: serious
Tags: cat.color, wcag2aa, wcag143, TTv5, TT13.c, EN-301-549, EN-9.1.4.3, ACT
Description: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
Help: Elements must meet minimum color contrast ratio thresholds
Nodes:

  • HTML: <a href="/" class="toolbar-icon toolbar-icon-toolbar-menu toolbar-icon-toolbar-menu-sections trigger toolbar-item" data-drupal-subtrees="" id="toolbar-item-toolbar-menu-sections" data-toolbar-tray="toolbar-item-toolbar-menu-sections-tray" role="button" aria-pressed="false" style="background-color: rgb(2, 191, 231); border-bottom: 0px; color: rgb(33, 33, 33);">
    Impact: serious
    Target: #toolbar-item-toolbar-menu-sections
    Summary: Fix any of the following:
    Element has insufficient color contrast of 2.18 (foreground color: #ffffff, background color: #02bfe7, font size: 9.8pt (13px), font weight: bold). Expected contrast ratio of 4.5:1

  • HTML: <a href="/help" class="toolbar-icon toolbar-icon-help toolbar-item" style="background-color: rgb(2, 191, 231); border-bottom: 0px; color: rgb(33, 33, 33);">Knowledge Base</a>
    Impact: serious
    Target: .toolbar-icon-help
    Summary: Fix any of the following:
    Element has insufficient color contrast of 2.18 (foreground color: #ffffff, background color: #02bfe7, font size: 9.8pt (13px), font weight: bold). Expected contrast ratio of 4.5:1

  • HTML: <a href="/user" class="toolbar-icon toolbar-icon-user trigger toolbar-item" id="toolbar-item-user" data-toolbar-tray="toolbar-item-user-tray" role="button" aria-pressed="false" style="background-color: rgb(2, 191, 231); border-bottom: 0px; color: rgb(33, 33, 33);">test_Savannah.Johnston</a>
    Impact: serious
    Target: #toolbar-item-user
    Summary: Fix any of the following:
    Element has insufficient color contrast of 2.18 (foreground color: #ffffff, background color: #02bfe7, font size: 9.8pt (13px), font weight: bold). Expected contrast ratio of 4.5:1

@ryguyk ryguyk marked this pull request as draft February 4, 2025 21:34
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 5, 2025 08:45 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 6, 2025 08:37 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 7, 2025 08:43 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 8, 2025 08:44 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 9, 2025 08:48 Destroyed
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.

Form Builder: Add default paragraphs upon initial node creation
2 participants