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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement UsaModal component #56

Closed
2 tasks done
patrickcate opened this issue Oct 30, 2021 · 0 comments
Closed
2 tasks done

Implement UsaModal component #56

patrickcate opened this issue Oct 30, 2021 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@patrickcate
Copy link
Owner

patrickcate commented Oct 30, 2021

Modal

A modal disables page content and focuses the user's attention on a single task or message.

status: draft

Props

Name Type Default Required Options
size Boolean false false n/a
force-action Boolean false false n/a
heading String '' false n/a
heading-tag String h2 false h1, h2, h3, h4, h5, h6

Slots

  • header
  • default
  • footer
  • close-button

CSS Classes

  • size: usa-modal--lg

External Libraries

  • None

Sub-Components

Dependencies

Notes

  • v-model for modal open state.

Tests

  1. When the size prop value is lg, the CSS class usa-modal--lg is applied.
  2. When the forceAction prop is true, the modal close button is not rendered.
  3. When the modal is open, the overlay component is display underneath it.
  4. When the modal is open and the forceAction prop is false, clicking the overlay closes the modal.
  5. When the modal is open and the forceAction prop is false, pressing the escape key closes the modal.
  6. When the modal is open and the forceAction prop is false, clicking the close button closes the modal.
  7. When the modal is open, focus is "trapped" to elements within the modal.
  8. When the modal is open, the page content underneath cannot be scrolled.
  9. The open button should render at the bottom of the model, but display at the top right.
  10. The root element should have a aria-labelledby set to the id of the heading.
  11. The root element should have a aria-describedby set to the id of the body text.
  12. When the heading prop is used, the text is added as the modal heading.
  13. When the heading slot is used, the content is added as the modal heading.
  14. When the heading prop and slot are both used, the heading slot will override the heading prop.
@patrickcate patrickcate added the feature New feature or request label Nov 11, 2021
@patrickcate patrickcate self-assigned this Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant