-
Notifications
You must be signed in to change notification settings - Fork 1k
USWDS - Modal: Create modal component #3981
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
Conversation
padding: units(1) units(4) units(4); | ||
} | ||
|
||
.usa-modal__header { |

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.
Is the intention that usa-modal__heading
live inside here or is this separate?

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 way we usually use this is that a header
is a section and a heading
is an h
-level element. We currently have a heading, but it looks like the header is not yet implemented. I'm going to remove this code
src/components/test/kitchen-sink.njk
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
{% block body %} | |||
|
|||
{% render '@modal' %} |
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.
Let's remove this once we finalize this component.
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 remove it, rather just moved it to a more conventional location. It'll be useful to keep it there I think.
- remove unused header code - remove shadow - add typeset - remove z-index from settings
Description
This will add an accessible modal window to the design system
Issue: #3936
Screenshots
Default size

Large size

Additional features
navigation.js
to fix content shifting when mobile navigation is opened.focus-trap.js
to trap focus if focus is set to a window, instead of content within the windowAccessibility features:
force-action
data attributeBefore you hit Submit, make sure you’ve done whichever of these applies to you:
npm test
and make sure the tests for the files you have changed have passed.Other to-do's:
Testing conducted: