diff --git a/apps/website/pages/patterns/error.tsx b/apps/website/pages/patterns/error.tsx new file mode 100644 index 000000000..818397540 --- /dev/null +++ b/apps/website/pages/patterns/error.tsx @@ -0,0 +1,13 @@ +import Head from "next/head"; +import ErrorPatternPage from "screens/patterns/error/ErrorPatternPage"; + +const Index = () => ( + <> +
+tabIndex property unless there is a specific
+ accessibility requirement.
+ Toast instead, which
+ costs nothing to the user who meant it.
+ Toast or an inline Alert.
+ Toast.
+ Esc: Does exactly the same as the secondary action.
+ Spinner over
+ a dark overlay until the action finishes, then show the result.
+ Alert (error, inline) where the user is. The message explains
+ what went wrong and how to proceed, with an action such as Retry where possible.
+ Toast (success), for
+ example “5 records deleted”.
+
+
+ Alert
+
+ {" "}
+ in modal mode, with the error semantic for the destructive variant and the warning semantic for the
+ warning variant. The alert provides the icon, title, description, primary action, secondary action, close
+ action and overlay, so they are not composed by hand.
+
+
+ Toast
+
+
+ , never a second modal.
+ Tab: moves forward through the modal’s focusable elements, cycling within the modal
+ Shift + Tab: moves backward through the modal’s focusable elements
+ Enter or Space: activates the focused action
+ Esc: closes the modal without performing the action, and returns focus to the trigger
+ alertdialog role, labelled by its title and described by its description,
+ so both are read as soon as it opens. The variant is conveyed in text as well as colour, through the
+ wording of the title and the icon’s text alternative, never by colour alone.
+