@@ -54,6 +54,8 @@ the first non-white space in the preceding line. For example::
5454
5555Refer to the Zephyr :ref: `coding_style ` for additional requirements.
5656
57+ .. _headings :
58+
5759Headings
5860========
5961
@@ -1301,6 +1303,99 @@ Boards
13011303 produce a complete table. If disabled, a warning message will be shown instead of the runners
13021304 tables.
13031305
1306+ Accessibilty Guidelines
1307+ ***********************
1308+
1309+ Accessibility is an important aspect of documentation, ensuring that all users, including those with
1310+ disabilities, can access and understand the content.
1311+
1312+ When writing and maintaining Zephyr Project documentation, please follow these guidelines to improve
1313+ accessibility for everyone.
1314+
1315+ Images and Figures
1316+ ==================
1317+
1318+ All images and figures must include appropriate alternative text (alt text) to convey the meaning of
1319+ the visual content to users who rely on screen readers or cannot view images.
1320+
1321+ * Use the ``:alt: `` attribute when including images using the :rst:dir: `image ` directive. Example:
1322+
1323+ .. code-block :: rst
1324+ :emphasize-lines: 2
1325+
1326+ .. image:: image/doc-gen-flow.png
1327+ :alt: Documentation generation process overview
1328+
1329+ * If the image contains text, ensure that the alt text includes this text verbatim.
1330+
1331+ * When using the :rst:dir: `figure ` directive, which allows for a caption, the ``:alt: `` text is
1332+ still important. The alt text should describe the image itself, while the caption provides
1333+ additional context or interpretation. Example:
1334+
1335+ .. code-block :: rst
1336+ :emphasize-lines: 4
1337+
1338+ .. figure:: ../../images/arch-diagram.png
1339+ :alt: High-level overview of Zephyr OS architecture showing layers and components.
1340+
1341+ High-level overview of Zephyr OS architecture.
1342+
1343+ - Avoid using images as the sole method of conveying information that can be explained
1344+ clearly with text.
1345+
1346+ .. admonition :: Best Practices for writing alt text
1347+ :class: tip
1348+
1349+ * **Be Accurate and Equivalent **: Present the same essential information as the image.
1350+ * **Be Succinct **: Convey the core message of the image concisely.
1351+ * **Avoid Redundancy **: Do not use phrases like "Image of..." or "Picture of..." as screen readers
1352+ typically announce the element as an image.
1353+ * **Describe, Don't Interpret **: Stick to describing what is visually present on the image.
1354+ * **Complex Images **: For charts, diagrams, or other complex visuals, provide a summary in the alt
1355+ text. If a full understanding requires more detail, consider providing a more detailed
1356+ description in the surrounding text or as part of the figure caption. Using text-based diagram
1357+ tools like :ref: `Graphviz <graphviz_diagrams >` can also improve accessibility.
1358+
1359+
1360+ Headings and Structure
1361+ ======================
1362+
1363+ Use :ref: `headings <headings >` to structure your document logically. This allows users of assistive
1364+ technologies to understand the document's organization and navigate it efficiently.
1365+
1366+ Tables
1367+ ======
1368+
1369+ Tables should be used only for tabular data and must be accessible to screen readers.
1370+
1371+ * Always define headers for rows and columns.
1372+
1373+ * Use the :rst:dir: `list-table ` directive when possible for better responsiveness and accessibility.
1374+
1375+ * Include a caption for tables where context is not immediately obvious. Example:
1376+
1377+ .. code-block :: rst
1378+ :emphasize-lines: 1
1379+
1380+ .. list-table:: GPIO Pin Configuration Options
1381+ :widths: 15 30
1382+ :header-rows: 1
1383+
1384+ * - Field
1385+ - Description
1386+ * - GPIO_INPUT
1387+ - Configures pin as input
1388+ * - GPIO_OUTPUT
1389+ - Configures pin as output
1390+
1391+ Additional Resources
1392+ ====================
1393+
1394+ For more general guidance on web accessibility you may refer to W3C's
1395+ `Web Content Accessibility Guidelines (WCAG) `_
1396+
1397+ .. _`Web Content Accessibility Guidelines (WCAG)` : https://www.w3.org/WAI/standards-guidelines/wcag/
1398+
13041399References
13051400**********
13061401
0 commit comments