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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flash of accordion content during page load #10458

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 18, 2024

馃洜 Summary of changes

This updates Accordion component markup, removing invalid usa-accordion__container wrapper element, in order to allow the intended improvement from @18f/identity-design-system@9.1.0 to prevent flashing content during page load.

This follows a similar change from the introduction of that enhancement in 18F/identity-design-system#434 to alter the documented component markup, "[removing] an unnecessary and useless usa-accordion__container container element which is not standard to USWDS and would make the JavaScript hiding behavior ineffective".

馃摐 Testing Plan

  1. Go to http://localhost:3000
  2. Create an account
  3. At password entry screen, refresh the page with cache disabled
  4. Observe no flash of open accordion content for "Password safety tips"

馃憖 Screenshots

Screen recordings emulating slower page loads with "Fast 3G" preset in Chrome network simulation..

Before:

before.mov

After:

after.mov

changelog: Bug Fixes, Components, Fix flash of accordion content during page load
@aduth aduth merged commit 1337c19 into main Apr 18, 2024
2 checks passed
@aduth aduth deleted the aduth-accordion-container-js-flash branch April 18, 2024 15:02
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.

None yet

2 participants