Diagrams are useful in documentation to help illustrate engineering concepts and guides. However, it's important to ensure diagrams on fuchsia.dev are accessible and updatable. This guide shows you how to add maintainable diagrams to Fuchsia documentation.
Generate a simple flow diagram from text in the source code. Options:
Create a visual diagram in Google Drawings, Slides, or other tools
{% dynamic if user.is_googler %}
For more complex images, high-level concepts, or diagrams that require UX design, partner with XD to create a diagram in Figma. File a bug to request assistance.
{% dynamic endif %}
If you are creating a visual diagram for documentation on fuchsia.dev, follow these steps:
Create a visual diagram in your tool of choice and either use a code block for tools like Mermaid or export the image as a .svg (suggested) or .png file.
For images, ensure to do the following:
Embed the image on fuchsia.dev using Markdown. For example: see instructions.
{mermaid}
Note: Use the Mermaid live editor to create your diagram. For more information about Mermaid syntax, see the Mermaid documentation.
{markdown}
{html}
{% verbatim %} <pre class="mermaid"> graph LR A[Square Rect] -- Link text --> B((Circle)) A --> C(Round Rect) B --> D{Rhombus} C --> D </pre> {% endverbatim %}
<div>
{% framebox %}
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.4.1/dist/mermaid.min.js">
</script>
<pre class="mermaid">
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
</pre>
{% endframebox %}
</div>
{.svg/.png}
Note: If applicable, store your image in a image/ directory near your Markdown file.
Make sure to add alt text to the image. Alt text helps screen reader users understand the content of your image. For example:

Alt text with a concise description of the image.image_filename.svg with the actual filename of your image.For example:

{% dynamic if user.is_googler %}
If you used a tool like Google Drawings or Slides to create a visual diagram, follow these additional steps:
Create a bug to make the diagram maintainable on fuchsia.dev using the template at go/fuchsia-diagram. In the bug, include:
Add a comment in the markdown file with a link to the bug that contains the diagram source information. For example:
Note: These bugs are intentionally internal-only, even though there may be instances when the diagram is visible to the public on an open source page. While this may not fall under the best practice, the bug links will be labeled “Diagram source” for transparency.
{% verbatim %} {# Diagram source: link to bug #} {% endverbatim %}
{% dynamic endif %}
Diagrams are a useful tool for providing additional clarity or context that is not easily conveyed through words alone. Effective diagrams should directly support and enhance the accompanying text in documentation.
Focus: Each diagram should have a clear focus and convey a specific concept or idea. Label all elements clearly and concisely.
Simplicity: Strive for visual clarity. Avoid excessive complexity or visual clutter that might confuse the reader.
Consistency: Maintain a consistent style and visual language across all diagrams within Fuchsia documentation.
Internationalization: Keep text within diagrams to a minimum. If text is necessary, ensure it is translatable and localized. Use universally recognized symbols and icons whenever possible.
Visual hierarchy: Use clear and consistent visual hierarchy to guide the reader's eye through the diagram. Use whitespace to create visual separation and improve readability.
Color: Use sufficient color contrast to ensure readability for users with visual impairments. Avoid using color as the sole means of conveying information.
Scalability: Ensure diagrams are scalable and can be zoomed in without losing clarity.
Provide concise and informative alternative text descriptions for all diagrams. Alt text should:
Note: Avoid using phrases like “image of” or “diagram of” as screen readers already identify them as images.
Alt text examples: