You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An `<sp-illustrated-message>` displays an illustration icon and a message, usually in an empty state or on an error page. It is also used inside a DropZone.
3
+
An `<sp-illustrated-message>` displays an outline illustration and a message, usually in an empty state or on an error page. It is also used inside a [DropZone](/components/dropzone).
4
4
5
5
### Usage
6
6
7
7
[](https://www.npmjs.com/package/@spectrum-web-components/illustrated-message)
8
8
[](https://bundlephobia.com/result?p=@spectrum-web-components/illustrated-message)
9
9
[](https://stackblitz.com/edit/vitejs-vite-qrvmdaws)
An illustrated message consists of the following parts:
30
+
31
+
- An **outline illustration** that supports the messaging. The illustrated message accepts an `<svg>` into its default slot. This SVG is displayed as an illustration above the heading and description.
32
+
- A required **heading** that appears in bold below the illustration, using a few words to convey what a user needs to do or know about.
33
+
- An optional **body area** that elaborates on the heading and offers more information about how to complete the interaction, including buttons or links to show the user what to do next.
description="This page isn't available. Try checking the URL or visit a different page."
33
146
>
34
147
<svg
35
148
xmlns="http://www.w3.org/2000/svg"
@@ -45,6 +158,14 @@ import { IllustratedMessage } from '@spectrum-web-components/illustrated-message
45
158
</sp-illustrated-message>
46
159
```
47
160
48
-
## Content
161
+
</sp-tab-panel>
162
+
</sp-tabs>
163
+
164
+
### Accessibility
165
+
166
+
The `<sp-illustrated-message>` component provides a semantic structure for displaying illustrated content with proper heading hierarchy. However, there are several considerations to keep in mind for accessibility:
49
167
50
-
The illustrated message accepts an `<svg>` into its default slot. This SVG is displayed as an illustration above the heading and description.
168
+
-**Always include a clear, standalone heading.** All illustrated messages must include a heading or title. This heading communicates the result of why the UI is appearing in the way that it is. If included, the description elaborates on the heading and offers more information.
169
+
-**Ensure that text and image work together.** The illustration within an illustrated message adds value to the language that it’s paired with, and vice versa. An illustration’s meaning should be readily clear, contextual, and relevant to the overall message described in the text.
170
+
-**Provide actionable solutions.** Offer an actionable solution when possible by using [links](/components/link) or [buttons](/components/button).
171
+
-**Make error codes meaningful and contextual.** If an illustrated message is for an error state, use the heading to summarize the error. Only include an error code or other technical information if it’s useful and relevant for the user. Put the error code either at the beginning of the heading using a colon, or at the end of the message using parentheses; don’t hide it in the middle of the heading or bury it in the description.
0 commit comments