"success" Macro
Reference
Description
The success macro displays its content in a box carrying a success icon, for an operation that completed as the reader wanted. In the macro list of the editors it appears as "Success Message", in the "Formatting" category.
It is a "box" Macro with an icon and a styling of its own. Beside the icon the macro renders the invisible label "Success", which screen readers announce, so the kind of message does not rest on colour and shape alone.
Usage
{{success}}The message to display.{{/success}}The content is mandatory: a message macro with an empty content reports an error instead of rendering an empty box. This is the one way these macros differ from the box macro, whose content is optional.
The box carries the CSS classes box and successmessage. The colours and the icon come from the skin, so a message looks different under another skin than under Flamingo.
Parameters
| Name | Mandatory | Allowed Values | Default Value | Description |
|---|---|---|---|---|
| content | yes | wiki content | none | The message to display. |
| status | no | true or false | false | Whether the message reports the state of something that just happened, such as the outcome of a form the reader submitted. It then carries the ARIA status role, which makes screen readers announce it when it appears. Leave it off for a message that is simply part of the page. |
Every parameter of the "box" Macro applies as well: cssClass, title, image and width.
Examples
A Standalone Success Message
{{success}}This is a success message{{/success}}
An Inline Success Message
Written inside a paragraph, the macro renders a SPAN carrying the same icon, so a short remark can sit in the middle of a sentence.
The import finished, {{success}}every page was created{{/success}}, and the wiki is ready.
Feedback After a Form Submission
The message appears once the form has been submitted, so it is announced rather than left for the reader to notice. Nothing marks it out on screen: the difference is what a screen reader does with it.
{{success status="true"}}Your changes have been saved.{{/success}}