Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Will be updated based on team's inputs on naming
Description
Accessible dialog (modal) window based on a11y-dialog library:
dialog.show()
fadeIn
animationdialogId
(for instantiation and trigger),dialogTrigger
(triggers dialog opening) andcontent
(dialog content)ariaLabelledBy
(accessible dialog name), 'overlayClose' (closes the dialog on overlay click and defaults to true), anddialogBoxClass
(css class for styling)container
class for consistency with the existing layout, no other styles are added for maximum flexibility. Styles could be applied viadialogBoxClass
or directly in the dialog content - as demonstrated in the Story. Potentially, min/max-height can be hard-coded like this:Note: for some reason Tailwind classes like
max-h-*
don't work (with the exception ofmax-h-xl
), which affects mobile version look.Instructions to test
Check the storybook Dialog story, try to add 2 dialogs directly to the
index.html
to test multiple dialog instances on 1 pageTested in the following environments/browsers:
Operating System
Browser