Skip to content

Fix flash of accordion content during page load#10458

Merged
aduth merged 1 commit intomainfrom
aduth-accordion-container-js-flash
Apr 18, 2024
Merged

Fix flash of accordion content during page load#10458
aduth merged 1 commit intomainfrom
aduth-accordion-container-js-flash

Conversation

@aduth
Copy link
Contributor

@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
@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.

2 participants