Skip to content

Commit 271cc12

Browse files
committed
Add alt descriptions to all figures
1 parent 20ff28e commit 271cc12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+205
-89
lines changed

components/console/helpers/cursor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cursor position in a console command. This allows you to write on any position
1111
of the output:
1212

1313
.. image:: /_images/components/console/cursor.gif
14-
:align: center
14+
:alt: A command outputs on various positions on the screen, eventually drawing the letters "SF".
1515

1616
.. code-block:: php
1717

components/console/helpers/debug_formatter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ the results of running ``figlet symfony``, it might output something like
88
this:
99

1010
.. image:: /_images/components/console/debug_formatter.png
11-
:align: center
11+
:alt: Console output, with the first line showing "RUN Running figlet", followed by lines showing the output of the command prefixed with "OUT" and "RES Finished the command" as last line in the output.
1212

1313
Using the debug_formatter
1414
-------------------------

components/console/helpers/processhelper.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ a very verbose verbosity (e.g. ``-vv``)::
1919
will result in this output:
2020

2121
.. image:: /_images/components/console/process-helper-verbose.png
22+
:alt: Console output showing two lines: "RUN 'figlet' 'Symfony'" and "RES Command ran successfully".
2223

2324
It will result in more detailed output with debug verbosity (e.g. ``-vvv``):
2425

2526
.. image:: /_images/components/console/process-helper-debug.png
27+
:alt: In between the command line and the result line, the command's output is now shown prefixed by "OUT".
2628

2729
In case the process fails, debugging is easier:
2830

2931
.. image:: /_images/components/console/process-helper-error-debug.png
32+
:alt: The last line shows "RES 127 Command dit not run successfully", and the output lines show more the error information from the command.
3033

3134
Arguments
3235
---------

components/console/helpers/progressbar.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ When executing longer-running commands, it may be helpful to show progress
55
information, which updates as your command runs:
66

77
.. image:: /_images/components/console/progressbar.gif
8+
:alt: Console output showing a progress bar advance to 100%, with the esimated time left, the memory usage and a special message that changes when the bar closes completion.
89

910
.. note::
1011

components/form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ done by passing a special form "view" object to your template (notice the
511511
{{ form_end(form) }}
512512

513513
.. image:: /_images/form/simple-form.png
514-
:align: center
514+
:alt: An HTML form showing a text box labelled "Task", three select boxes for a year, month and day labelled "Due date" and a button labelled "Create Task".
515515

516516
That's it! By printing ``form_widget(form)``, each field in the form is
517517
rendered, along with a label and error message (if there is one). While this is

components/http_kernel.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ and ends with a :class:`Symfony\\Component\\HttpFoundation\\Response`.
7272

7373
.. raw:: html
7474

75-
<object data="../_images/components/http_kernel/http-workflow.svg" type="image/svg+xml"></object>
75+
<object data="../_images/components/http_kernel/http-workflow.svg" type="image/svg+xml"
76+
alt="A flow diagram showing all HTTP Kernel events in the Request-Response lifecycle. Each event is numbered 1 to 8 and described in detail in the following subsections."
77+
></object>
7678

7779
The exact details of this workflow are the key to understanding how the kernel
7880
(and the Symfony Framework or any other library that uses the kernel) works.
@@ -504,7 +506,9 @@ to the exception.
504506

505507
.. raw:: html
506508

507-
<object data="../_images/components/http_kernel/http-workflow-exception.svg" type="image/svg+xml"></object>
509+
<object data="../_images/components/http_kernel/http-workflow-exception.svg" type="image/svg+xml"
510+
alt="The HTTP KErnel flow diagram showing how exceptions bypass all further steps and are directly transformed to responses."
511+
></object>
508512

509513
Each listener to this event is passed a :class:`Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent`
510514
object, which you can use to access the original exception via the
@@ -663,7 +667,9 @@ your controller).
663667

664668
.. raw:: html
665669

666-
<object data="../_images/components/http_kernel/http-workflow-subrequest.svg" type="image/svg+xml"></object>
670+
<object data="../_images/components/http_kernel/http-workflow-subrequest.svg" type="image/svg+xml"
671+
alt="The HTTP Kernel flow diagram with a sub request from a controller starting the lifecycle at step 1 again and feeding the sub Response content back into the controller."
672+
></object>
667673

668674
To execute a sub request, use ``HttpKernel::handle()``, but change the second
669675
argument as follows::

components/messenger.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ Concepts
2727

2828
.. raw:: html
2929

30-
<object data="../_images/components/messenger/overview.svg" type="image/svg+xml"></object>
30+
<object data="../_images/components/messenger/overview.svg" type="image/svg+xml"
31+
alt="A flow diagram visualizing how each concept relates to eachother. Each concept is described in the subsequent text."
32+
></object>
3133

3234
**Sender**:
3335
Responsible for serializing and sending messages to *something*. This

components/serializer.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@ In order to do so, the Serializer component follows the following schema.
88

99
.. raw:: html
1010

11-
<object data="../_images/components/serializer/serializer_workflow.svg" type="image/svg+xml"></object>
12-
13-
As you can see in the picture above, an array is used as an intermediary between
14-
objects and serialized contents. This way, encoders will only deal with turning
15-
specific **formats** into **arrays** and vice versa. The same way, Normalizers
16-
will deal with turning specific **objects** into **arrays** and vice versa.
17-
18-
Serialization is a complex topic. This component may not cover all your use cases out of the box,
19-
but it can be useful for developing tools to serialize and deserialize your objects.
11+
<object data="../_images/components/serializer/serializer_workflow.svg" type="image/svg+xml"
12+
alt="A flow diagram showing how objects are serialized/deserialized. This is described in the subsequent paragraph."
13+
></object>
14+
15+
When (de)serializing objects, the Serializer uses an array as the intermediary
16+
between objects and serialized contents. Encoders will only deal with
17+
turning specific **formats** into **arrays** and vice versa. The same way,
18+
normalizers will deal with turning specific **objects** into **arrays** and
19+
vice versa. The Serializer deals with calling the normalizers and encoders
20+
when serializing objects or deserializing formats.
21+
22+
Serialization is a complex topic. This component may not cover all your use
23+
cases out of the box, but it can be useful for developing tools to
24+
serialize and deserialize your objects.
2025

2126
Installation
2227
------------

components/string.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The following image displays the bytes, code points and grapheme clusters for
4848
the same word written in English (``hello``) and Hindi (``नमस्ते``):
4949

5050
.. image:: /_images/components/string/bytes-points-graphemes.png
51-
:align: center
51+
:alt: Each letter in "hello" is made up of one byte, one code point and one grapheme cluster. In the Hindi translation, the first two letters ("नम") take up three bytes, one code point and one grapheme cluster. The last letters ("स्ते") each take up six bytes, two code points and one grapheme cluster.
5252

5353
Usage
5454
-----

components/var_dumper.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ then its dump representation::
354354
dump($var);
355355

356356
.. image:: /_images/components/var_dumper/01-simple.png
357+
:alt: Dump output showing the array with length five and all keys and values.
357358

358359
.. note::
359360

@@ -371,6 +372,7 @@ then its dump representation::
371372
dump($var);
372373
373374
.. image:: /_images/components/var_dumper/02-multi-line-str.png
375+
:alt: Dump output showing the string on multiple lines in between three quotes.
374376

375377
.. code-block:: php
376378
@@ -385,6 +387,7 @@ then its dump representation::
385387
dump($var);
386388
387389
.. image:: /_images/components/var_dumper/03-object.png
390+
:alt: Dump output showing the PropertyExample object and all three properties with their values.
388391

389392
.. note::
390393

@@ -403,6 +406,7 @@ then its dump representation::
403406
dump($var);
404407
405408
.. image:: /_images/components/var_dumper/04-dynamic-property.png
409+
:alt: Dump output showing the DynamicPropertyExample object and both declared and undeclared properties with their values.
406410

407411
.. code-block:: php
408412
@@ -415,6 +419,7 @@ then its dump representation::
415419
dump($var);
416420
417421
.. image:: /_images/components/var_dumper/05-soft-ref.png
422+
:alt: Dump output showing the "aCircularReference" property value referencing the parent object, instead of showing all properties again.
418423

419424
.. code-block:: php
420425
@@ -428,6 +433,7 @@ then its dump representation::
428433
dump($var);
429434
430435
.. image:: /_images/components/var_dumper/06-constants.png
436+
:alt: Dump output with the "E_WARNING" constant shown as value of "severity".
431437

432438
.. code-block:: php
433439
@@ -441,6 +447,7 @@ then its dump representation::
441447
dump($var);
442448
443449
.. image:: /_images/components/var_dumper/07-hard-ref.png
450+
:alt: Dump output showing the referenced arrays.
444451

445452
.. code-block:: php
446453
@@ -451,6 +458,7 @@ then its dump representation::
451458
dump($var);
452459
453460
.. image:: /_images/components/var_dumper/08-virtual-property.png
461+
:alt: Dump output of the ArrayObject.
454462

455463
.. code-block:: php
456464
@@ -464,6 +472,7 @@ then its dump representation::
464472
dump($var);
465473
466474
.. image:: /_images/components/var_dumper/09-cut.png
475+
:alt: Dump output where the children of the Container object are hidden.
467476

468477
.. _var-dumper-advanced:
469478

components/workflow.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ process is called a *place*. You do also define *transitions* that describe
2222
the action to get from one place to another.
2323

2424
.. image:: /_images/components/workflow/states_transitions.png
25+
:alt: An example state diagram for a workflow, showing transitions and places.
2526

2627
A set of places and transitions creates a **definition**. A workflow needs
2728
a ``Definition`` and a way to write the states to the objects (i.e. an

console.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ commands support name and option completion, and some can even complete
7777
values.
7878

7979
.. image:: /_images/components/console/completion.gif
80+
:alt: The terminal completes the command name "secrets:remove" and the argument "SOME_OTHER_SECRET".
8081

8182
First, make sure you installed and setup the "bash completion" package for
8283
your OS (typically named ``bash-completion``). Then, install the Symfony

contributing/code/stack_trace.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Several things need to be paid attention to when picking a stack trace
9191
from your development environment through a web browser:
9292

9393
1. Are there several exceptions? If yes, the most interesting one is
94-
often exception 1/n which, is shown *last* in the example below (it
95-
is the one marked as an exception [1/2]).
94+
often exception 1/n which, is shown *last* in the default exception page
95+
(it is the one marked as ``exception [1/2]`` in the below example).
9696
2. Under the "Stack Traces" tab, you will find exceptions in plain
9797
text, so that you can easily share them in e.g. bug reports. Make
9898
sure to **remove any sensitive information** before doing so.
@@ -102,8 +102,8 @@ from your development environment through a web browser:
102102
are getting, but are not what the term "stack trace" refers to.
103103

104104
.. image:: /_images/contributing/code/stack-trace.gif
105-
:align: center
106-
:class: with-browser
105+
:alt: The default Symfony exception page with the "Exceptions", "Logs" and "Stack Traces" tabs.
106+
:class: with-browser
107107

108108
Since stack traces may contain sensitive data, they should not be
109109
exposed in production. Getting a stack trace from your production

contributing/documentation/overview.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ while you're reading the Symfony documentation.
2525
and you'll be redirected to GitHub:
2626

2727
.. image:: /_images/contributing/docs-github-edit-page.png
28-
:align: center
29-
:class: with-browser
28+
:alt: The "Edit this page" button is located directly below the first heading.
29+
:class: with-browser
3030

3131
**Step 2.** Edit the contents, describe your changes and click on the
3232
**Propose file change** button.
@@ -36,8 +36,8 @@ and you'll be redirected to GitHub:
3636
also display a preview of your changes:
3737

3838
.. image:: /_images/contributing/docs-github-create-pr.png
39-
:align: center
40-
:class: with-browser
39+
:alt: The "Comparing changes" page on GitHub.
40+
:class: with-browser
4141

4242
If everything is correct, click on the **Create pull request** button.
4343

@@ -152,7 +152,7 @@ exact changes that you want to propose, select the appropriate branches where
152152
changes should be applied:
153153

154154
.. image:: /_images/contributing/docs-pull-request-change-base.png
155-
:align: center
155+
:alt: The base branch select option on the GitHub page.
156156

157157
In this example, the **base fork** should be ``symfony/symfony-docs`` and
158158
the **base** branch should be the ``5.4``, which is the branch that you selected

controller/error_pages.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ Symfony catches all the exceptions and displays a special **exception page**
1010
with lots of debug information to help you discover the root problem:
1111

1212
.. image:: /_images/controller/error_pages/exceptions-in-dev-environment.png
13-
:alt: A typical exception page in the development environment
14-
:align: center
15-
:class: with-browser
13+
:alt: A typical exception page in the development environment with the full stacktrace and log information.
14+
:class: with-browser
1615

1716
Since these pages contain a lot of sensitive internal information, Symfony won't
1817
display them in the production environment. Instead, it'll show a minimal and
1918
generic **error page**:
2019

2120
.. image:: /_images/controller/error_pages/errors-in-prod-environment.png
22-
:alt: A typical error page in the production environment
23-
:align: center
24-
:class: with-browser
21+
:alt: A typical error page in the production environment.
22+
:class: with-browser
2523

2624
Error pages for the production environment can be customized in different ways
2725
depending on your needs:

doctrine.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,11 @@ objects to a ``product`` table in your database. Each property in the ``Product`
185185
entity can be mapped to a column in that table. This is usually done with attributes:
186186
the ``#[ORM\Column(...)]`` comments that you see above each property:
187187

188-
.. image:: /_images/doctrine/mapping_single_entity.png
189-
:align: center
188+
.. raw:: html
189+
190+
<object data="../_images/doctrine/mapping_single_entity.svg" type="image/svg+xml"
191+
alt="Doctrine mapping between properties of a Product PHP object and the data in the product database table"
192+
></object>
190193

191194
The ``make:entity`` command is a tool to make life easier. But this is *your* code:
192195
add/remove fields, add/remove methods or update configuration.
@@ -586,8 +589,8 @@ the :ref:`doctrine-queries` section.
586589
will display the number of queries and the time it took to execute them:
587590

588591
.. image:: /_images/doctrine/doctrine_web_debug_toolbar.png
589-
:align: center
590-
:class: with-browser
592+
:alt: The web dev toolbar showing the Doctrine item.
593+
:class: with-browser
591594

592595
If the number of database queries is too high, the icon will turn yellow to
593596
indicate that something may not be correct. Click on the icon to open the

doctrine/associations.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,11 @@ When you go to ``/product``, a single row is added to both the ``category`` and
409409
to whatever the ``id`` is of the new category. Doctrine manages the persistence of this
410410
relationship for you:
411411

412-
.. image:: /_images/doctrine/mapping_relations.png
413-
:align: center
412+
.. raw:: html
413+
414+
<object data="../_images/doctrine/mapping_relations.svg" type="image/svg+xml"
415+
alt="Doctrine mapping associated Product and Category entities to a product and category database table"
416+
></object>
414417

415418
If you're new to an ORM, this is the *hardest* concept: you need to stop thinking
416419
about your database, and instead *only* think about your objects. Instead of setting
@@ -456,8 +459,11 @@ Doctrine silently makes a second query to find the ``Category`` that's related
456459
to this ``Product``. It prepares the ``$category`` object and returns it to
457460
you.
458461

459-
.. image:: /_images/doctrine/mapping_relations_proxy.png
460-
:align: center
462+
.. raw:: html
463+
464+
<object data="../_images/doctrine/mapping_relations_proxy.svg" type="image/svg+xml"
465+
alt="Doctrine only querying Category data when needed"
466+
></object>
461467

462468
What's important is the fact that you have access to the product's related
463469
category, but the category data isn't actually retrieved until you ask for

form/create_custom_field_type.rst

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ following set of fields as the "postal address":
9494

9595
.. raw:: html
9696

97-
<object data="../_images/form/form-custom-type-postal-address.svg" type="image/svg+xml"></object>
97+
<object data="../_images/form/form-custom-type-postal-address.svg" type="image/svg+xml"
98+
alt="A wireframe of the custom field type, showing five text inputs: two address lines, the City, the State and the ZIP code."
99+
></object>
98100

99101
As explained above, form types are PHP classes that implement
100102
:class:`Symfony\\Component\\Form\\FormTypeInterface`, although it's more
@@ -429,12 +431,23 @@ second part of the Twig block name (e.g. ``_row``) defines which form type part
429431
is being rendered (row, widget, help, errors, etc.)
430432

431433
The article about form themes explains the
432-
:ref:`form fragment naming rules <form-fragment-naming>` in detail. The
433-
following diagram shows some of the Twig block names defined in this example:
434+
:ref:`form fragment naming rules <form-fragment-naming>` in detail. These
435+
are some examples of Twig block names for the postal address type:
434436

435437
.. raw:: html
436438

437-
<object data="../_images/form/form-custom-type-postal-address-fragment-names.svg" type="image/svg+xml"></object>
439+
<object data="../_images/form/form-custom-type-postal-address-fragment-names.svg" type="image/svg+xml"
440+
alt="The wireframe with some block names highlighted, these are also listed below the image."
441+
></object>
442+
443+
``postal_address_row``
444+
The full form type block.
445+
``postal_address_addressLine1_help``
446+
The help message block below the first address line.
447+
``postal_address_state_widget``
448+
The text input widget for the State field.
449+
``postal_address_zipCode_label``
450+
The label block of the ZIP Code field.
438451

439452
.. caution::
440453

0 commit comments

Comments
 (0)