Skip to content

Commit d3ba83b

Browse files
committed
Document alt description standards
1 parent cded7f6 commit d3ba83b

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

_images/sources/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Use the following snippet to embed the diagram in the docs:
3939
```
4040
.. raw:: html
4141
42-
<object data="../_images/<folder-name>/<diagram-file-name>.svg" type="image/svg+xml"></object>
42+
<object data="../_images/<folder-name>/<diagram-file-name>.svg" type="image/svg+xml"
43+
alt="<alt description>"
44+
></object>
4345
```
4446

4547
### Reasoning

contributing/documentation/standards.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,36 @@ Files and Directories
146146
├─ vendor/
147147
└─ ...
148148
149+
Images and Diagrams
150+
-------------------
151+
152+
* **Diagrams** must adhere to the Symfony docs style. These are created
153+
using the Dia_ application, to make sure everyone can edit them. See the
154+
`README on GitHub`_ for instructions on how to create them.
155+
* All images and diagrams must contain **alt descriptions**:
156+
157+
* Keep the descriptions concise, do not duplicate information surrounding
158+
the figure;
159+
* Describe complex diagrams in text surrounding the diagram instead of
160+
the alt description. In these cases, alt descriptions must describe
161+
where the longer description can be found (e.g. "These elements are
162+
described further in the next sections");
163+
* Start descriptions with a capital letter and end with a period;
164+
* Do not start with "A screenshot of", "Diagram of", etc. except when
165+
it's useful to know the exact type (e.g. a specific diagram type).
166+
167+
... code-block:: text
168+
169+
.. image:: _images/example-screenshot.png
170+
:alt: Some concise description of the screenshot.
171+
172+
.. raw:: html
173+
174+
<object data="_images/example-diagram.svg" type="image/svg+xml"
175+
alt="Some concise description."
176+
></object>
177+
178+
149179
English Language Standards
150180
--------------------------
151181

@@ -201,4 +231,6 @@ In addition, documentation follows these rules:
201231
.. _`American English Oxford Dictionary`: https://www.lexico.com/definition/american_english
202232
.. _`headings and titles`: https://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles
203233
.. _`Serial (Oxford) Commas`: https://en.wikipedia.org/wiki/Serial_comma
234+
.. _`Dia`: http://dia-installer.de/
235+
.. _`README on GitHub`: https://github.com/symfony/symfony-docs/blob/6.4/_images/sources/README.md
204236
.. _`nosism`: https://en.wikipedia.org/wiki/Nosism

0 commit comments

Comments
 (0)