Lead: Liav Nadler ONGOING
Related components: Toast, Dialog
Description
A message popup is a small modal window containing a warning, error message, help text or other important information
Usually it appears on user's action (e.g. clicking help icon) and it must be dismissed by the user
The popup may contains these elements:
- Header, including a title (e.g. "Warning") and a closing icon
- Icon (e.g. question mark icon for help)
- The message text
- Primary action button (Usually OK)
- Cancel button (when relevant)
Types
Help | |
Information | |
Warning | |
Error | |
Usage & Behaviour
General guidelines
- The popup appears in the center of the page and cannot be moved around the screen
- Transparent background?
- The popup has a fixed width
- The height of the popup is determined by the length of the message text, when the minimal popup should contain up to two lines of text
Interaction
- The user can dismiss the popup by either clicking the X icon on the upper-right corner or by clicking the OK button
- When relevant, clicking the OK button also perform the primary action (e.g. deleting a component). In this case a toast may appear to confirm that the action completed successfully
- When relevant, clicking the Cancel button closes the popup without performing any other action
Validations and errors
N/A
Best practices
- The message popup is more intrusive than a toast. Use it only for important messages (or long messaged in the case of help)
- Keep the title short and informative
- Keep the message text short and informative
Accessibility compliance
<<In general each component should be A11y complied, please follow the 3 guidelines linked below. At the very least we should document that each component is in compliance with each of the 3>>
Focus management
<<How will the component work with keyboard only - without a mouse. Can be reference if written above
We already set a general guidelines described in Keyboard & Focus Management Guidelines >>
Screen reader support
<<Make sure the components support screen reader for content or behaviour where needed - see Screen Reader Guidelines >>
Contrast & size compliance
<<Visual designers must comply with the minimal of Contrast + Font Size Guidelines for each component>>
Design
<<Zeplin Link>> | <<Screen with 200 width>> |
|
|
Code
<<a box containing the code - discuss with Femi>>