-
Notifications
You must be signed in to change notification settings - Fork 13
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
Nj 243 - Add headers to review screen #5563
base: main
Are you sure you want to change the base?
Conversation
Heroku app: https://gyr-review-app-5563-299e99447ffd.herokuapp.com/ |
payments_made_h3s = 1 | ||
use_tax_h3s = 1 | ||
reveal_h3 = 1 | ||
total_expected_h3s = household_details_h3s + income_details_h3s + dependents_attending_college_h3s + where_you_lived_as_of_dec_31_h3s + disability_exemption_h3s + veterans_exemption_h3s + medical_expenses_h3s + property_tax_h3s + payments_made_h3s + use_tax_h3s + reveal_h3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pebble ] The purpose of the test before was to make sure every white-group section box began with an h2, for consistent structure. Hence comparing the number of h2s to the number of white group boxes.
Now that we're beginning boxes with h3s instead, I think it makes sense to check that structure instead of just counting elements. Maybe checking that each white group has at least one h3? And that it comes before any other content?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ agree that just checking the totals (white groups = h3s) makes more sense. this looks like it's checking that each section has an h3 but since it just adds them up in the end it's actually not a very specific test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with the previous test is that not every white group on the page starts with a single h3 heading. Examples:
-
Income review white-group does not have any heading
<div id="income-info" class="white-group"> -
Refund or owed amount white-group uses an h2 heading, and can't be switched to h3 or it will fail axe validation
<div class="white-group"> -
Household info has multiple h3 headings, one for self, one for spouse, and one for each dependents:
<% current_intake.dependents.each_with_index do | dependent, index | %>
The previous test (white-groups=h2s) was not testing what we wanted to test , since abstract_header
had been using h3 headings in its white-group sections and we were previously checking against h2 headings.
I started trying to modify the math to make it work, but with all the cases above, it seemed much more readable to just assert what I expected for each section. Happy to explore other options if folks have suggestions, but just pulling the # of white groups and trying to modify that to match the number of h3s required a lot of arithmetic that seemed really opaque.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just read Melanie's comment more closely and found the suggestion to check for the presence of a header before any other content in the white-group, which would make a lot more sense here rather than just asserting that every white-group has an h3. Exploring that solution now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use consistent heading structure, and the visual appearance should reflect the markup. It doesn't make sense to start some white groups with h2s and others with h3s-- all of the content should be broken into sections if any of it is. The design might need to be tweaked if this isn't currently possible
@@ -6,7 +6,7 @@ | |||
<% if current_intake.dependents.count(&:under_22?).positive? %> | |||
<section id="college-dependents" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<h2 class="text--body text--bold spacing-below-5"><%=t(".college_dependents") %></h2> | |||
<h3 class="text--body text--bold spacing-below-5"><%=t(".college_dependents") %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
<h3 class="text--body text--bold spacing-below-5"><%=t(".college_dependents") %></h2> | |
<h3 class="text--body text--bold spacing-below-5"><%=t(".college_dependents") %></h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my gosh! Thanks for catching, I'm so sorry - I forgot to change all these closing tags. Will put out a revision.
@@ -26,7 +26,7 @@ | |||
<% if current_intake.dependents.any? && current_intake.has_health_insurance_requirement_exception? %> | |||
<section id="missing-health-insurance" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<h2 class="text--body text--bold spacing-below-5"><%=t(".missing_health_insurance") %></h2> | |||
<h3 class="text--body text--bold spacing-below-5"><%=t(".missing_health_insurance") %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<h3 class="text--body text--bold spacing-below-5"><%=t(".missing_health_insurance") %></h2> | |
<h3 class="text--body text--bold spacing-below-5"><%=t(".missing_health_insurance") %></h3> |
@@ -46,7 +46,7 @@ | |||
<% if current_intake.filing_status_qw? %> | |||
<section id="year-of-death" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<h2 class="text--body text--bold spacing-below-5"><%=t(".year_of_death") %></h2> | |||
<h3 class="text--body text--bold spacing-below-5"><%=t(".year_of_death") %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<h3 class="text--body text--bold spacing-below-5"><%=t(".year_of_death") %></h2> | |
<h3 class="text--body text--bold spacing-below-5"><%=t(".year_of_death") %></h3> |
@@ -59,7 +59,7 @@ | |||
|
|||
<section id="county-municipality" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<h2 class="text--body text--bold spacing-below-5"><%=t(".county_municipality", filing_year: current_tax_year) %></h2> | |||
<h3 class="text--body text--bold spacing-below-5"><%=t(".county_municipality", filing_year: current_tax_year) %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<h3 class="text--body text--bold spacing-below-5"><%=t(".county_municipality", filing_year: current_tax_year) %></h2> | |
<h3 class="text--body text--bold spacing-below-5"><%=t(".county_municipality", filing_year: current_tax_year) %></h3> |
@@ -74,11 +74,11 @@ | |||
<section id="disabled_exemption" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<% unless current_intake.primary_disabled_unfilled? %> | |||
<h2 class="text--body text--bold spacing-below-5"><%= t(".primary_disabled") %></h2> | |||
<h3 class="text--body text--bold spacing-below-5"><%= t(".primary_disabled") %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.....didn't realize how many of these there are. you get the point 🙈
@@ -6,7 +6,7 @@ | |||
<% if current_intake.dependents.count(&:under_22?).positive? %> | |||
<section id="college-dependents" class="white-group"> | |||
<div class="spacing-below-5"> | |||
<h2 class="text--body text--bold spacing-below-5"><%=t(".college_dependents") %></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[a mound of pebbles] - looks like the h2
-> h3
change was only on the opening tag and not on the closing one. And that seems to apply to all the changes in this PR. it might still render correctly in browsers and test drivers which would hide the issue, but we should fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotta fix the closing tags! (also would love to see melanie's testing suggestion implemented but that's not blocking)
Link to pivotal/JIRA issue
https://github.com/newjersey/affordability-pm/issues/243
Is PM acceptance required? (delete one)
Reminder: merge main into this branch and get green tests before merging to main
What was done?
How to test?
Screenshots (for visual changes)