-
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 78 axe a11y #5323
base: main
Are you sure you want to change the base?
Nj 78 axe a11y #5323
Conversation
Heroku app: https://gyr-review-app-5323-3ed2fa7daa99.herokuapp.com/ |
@@ -14,4 +14,4 @@ | |||
</div> | |||
</div> | |||
</div> | |||
</main> | |||
</div> |
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.
[dust] I confess I don't understand this change -- which of the issues does this fix? I'm used to introducing main
when possible as being more semantic, so on a surface level this surprises me.
Edit: After looking at more of this diff, I wonder if it is because this ERB feeds into a larger page and thus the main
here would conflict with a main
from others?
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.
Yes, we should only have one main landmark per page. See newjersey/accessibility-pm#1
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.
got it, thanks!
@@ -17,7 +17,6 @@ | |||
label: t("general.negative"), | |||
input_html: { | |||
"data-follow-up": "#household-members", | |||
"aria-controls": "household-members" |
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.
[dust] I also don't understand the removal of this -- was it not effective or correct as it was?
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.
Axe flagged it, so I think it was either not correct, or needs to be added with js when the associated element appears, or was a problem bc of nested fieldsets. Going to surface this with Damian after the fieldset PR lands
@@ -651,31 +651,40 @@ | |||
|
|||
context "NJ", :flow_explorer_screenshot, js: true do | |||
|
|||
def advance_to_start_of_intake(df_persona_name) | |||
def advance_to_start_of_intake(df_persona_name, check_a11y: false) |
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.
[dust] I'm wondering why this is a toggle as opposed to always checking accessibility. Is checking costly in terms of time, so turning it off for most tests would reduce test suite time?
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.
Yes. I want to avoid duplicate checks of the same pages
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.
Makes sense! I'm curious about the scale of time saved, for future reference. But sounds good to me! (Also makes me wonder if there are other places in the slower tests like E2E or PDF filling that we can toggle off to save time... the CI taking 15 minutes is ok but feels like it could be quicker).
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.
thanks for addressing my questions -- looks good to me!
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.
Looks good! Had one question about alt text.
@@ -25,7 +25,7 @@ | |||
</div> | |||
<% end %> | |||
</div> | |||
<%= image_tag 'questions/welcome.svg', class: 'fyst-home-image' %> | |||
<%= image_tag 'questions/welcome.svg', class: 'fyst-home-image', alt: '' %> |
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.
[DUST] Would it be helpful to fill in the alt text here for the visually impaired, or is that unnecessary/overkill?
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.
This specifically needs an empty alt tag because it is a decorative image
advance_to_property_tax_page("Minimal", skip_health_insurance_eligibility: true) | ||
advance_to_start_of_intake("O neal walker catchall mfj", check_a11y: true) | ||
|
||
expect(page).to be_axe_clean |
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.
[DUST] Yay expectations on a11y issues!
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 have a few questions (one visual, one about html structure) but overall (with my very limited understanding of modern html, accessibility and landmarks) this seems like a reasonable change.
@@ -10,17 +10,17 @@ | |||
padding-right: .5rem; | |||
} | |||
font-size: 1.6rem; | |||
border: 1px solid $color-grey-medium; | |||
border: 1px solid $color-grey-dark; |
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'm not sure why this wouldn't result in a visual change, can you explain?
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.
This is one of the visual changes I called out, and included a screen shot for
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.
Sorry I missed that! Please post both before & after screenshots for visual changes, and please tag Anu & Madison on the slack thread for this PR to make sure they've gotten eyes on it before it goes in.
</div> | ||
</main> | ||
|
||
<% if content_for :footer %> |
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.
Looks like <header>
and <footer>
are defined in different places as of this change - should that be the case? Is there a benefit to bringing the <footer>
element up into this layout file, or is it impractical?
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.
TBH I was trying to make the lightest touch possible given the scope of the other changes I had to make, and it seemed like the footer didn't need intervention. Happy to bring it in here though if that's better!
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.
That's reasonable - just wanted to make sure I understood the rationale for the different treatment. I'm fine with it staying like this!
fd03469
to
7396c29
Compare
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.
lgtm, but as noted in my comment please post before & after screenshots and ping our designers to make sure they know about this change
7396c29
to
efc2fe4
Compare
Remove extra header tags Remove extra main tags Move footer, add empty alt tags, add more a11y checks, adapt css to new page structure Address header and focus issues on landing page
efc2fe4
to
fbbeb2c
Compare
Image should have been globally removed?? |
Link to pivotal/JIRA issue
Most issues fixed in this PR were identified previously in https://github.com/newjersey/affordability-pm/issues/78
Those previously identified issues are explained in greater detail in these tickets (which should be publicly visible):
newjersey/accessibility-pm#1
newjersey/accessibility-pm#2
newjersey/accessibility-pm#15
newjersey/accessibility-pm#8
And this critical issue is fixed as well:
newjersey/accessibility-pm#9
Is PM acceptance required? (delete one)
We probably also want CfA design review to make sure there are no unwanted visual changes.
What was done?
Tackle a handful of small accessibility issues and improve e2e testing.
How to test?
Navigate using the catchall persona to see as many screens as possible.
There should be no visual changes besides the keyboard focus (the critical issue linked above), back button color contrast, and dev button color contrast.
CfA reviewers, please check that the landmark changes don't affect anything that our team wouldn't notice.
Screenshots (for visual changes)
Used the
:focus-visible
pseudo class to make sure that there's no focus on click for the reveal, but there is a focus for keyboard usersBack button color contrast is improved
Before
After