Skip to content

Commit 20d13c3

Browse files
committed
Add alt texts to images
1 parent 3b4a41e commit 20d13c3

Some content is hidden

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

44 files changed

+249
-89
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

components/console/helpers/cursor.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ 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
15+
drawing the letters "SF".
1516

1617
.. code-block:: php
1718

components/console/helpers/debug_formatter.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ 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",
12+
followed by lines showing the output of the command prefixed with
13+
"OUT" and "RES Finished the command" as last line in the output.
1214

1315
Using the debug_formatter
1416
-------------------------

components/console/helpers/processhelper.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,21 @@ 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
23+
"RES Command ran successfully".
2224

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

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

2731
In case the process fails, debugging is easier:
2832

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

3138
Arguments
3239
---------

components/console/helpers/progressbar.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ 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
9+
the esimated time left, the memory usage and a special message
10+
that changes when the bar closes completion.
811

912
.. note::
1013

components/form.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ 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
515+
boxes for a year, month and day labelled "Due date" and a button
516+
labelled "Create Task".
515517

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

components/http_kernel.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ 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.
77+
Each event is numbered 1 to 8 and described in detail in the following subsections."
78+
></object>
7679

7780
The exact details of this workflow are the key to understanding how the kernel
7881
(and the Symfony Framework or any other library that uses the kernel) works.
@@ -504,7 +507,10 @@ to the exception.
504507

505508
.. raw:: html
506509

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

509515
Each listener to this event is passed a :class:`Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent`
510516
object, which you can use to access the original exception via the
@@ -663,7 +669,10 @@ your controller).
663669

664670
.. raw:: html
665671

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

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

components/messenger.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ 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
32+
concept is described in the subsequent text."
33+
></object>
3134

3235
**Sender**:
3336
Responsible for serializing and sending messages to *something*. This

components/serializer.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ 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
13+
in the subsequent paragraph."
14+
></object>
15+
16+
When (de)serializing objects, the Serializer uses an array as the intermediary
17+
between objects and serialized contents. Encoders will only deal with
18+
turning specific **formats** into **arrays** and vice versa. The same way,
19+
normalizers will deal with turning specific **objects** into **arrays** and
20+
vice versa. The Serializer deals with calling the normalizers and encoders
21+
when serializing objects or deserializing formats.
22+
23+
Serialization is a complex topic. This component may not cover all your use
24+
cases out of the box, but it can be useful for developing tools to
25+
serialize and deserialize your objects.
2026

2127
Installation
2228
------------

components/string.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ 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
52+
one grapheme cluster. In the Hindi translation, the first two
53+
letters ("नम") take up three bytes, one code point and one
54+
grapheme cluster. The last letters ("स्ते") each take up six
55+
bytes, two code points and one grapheme cluster.
5256

5357
Usage
5458
-----

components/var_dumper.rst

Lines changed: 11 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,8 @@ 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
410+
declared and undeclared properties with their values.
406411

407412
.. code-block:: php
408413
@@ -415,6 +420,8 @@ then its dump representation::
415420
dump($var);
416421
417422
.. image:: /_images/components/var_dumper/05-soft-ref.png
423+
:alt: Dump output showing the "aCircularReference" property value referencing
424+
the parent object, instead of showing all properties again.
418425

419426
.. code-block:: php
420427
@@ -428,6 +435,7 @@ then its dump representation::
428435
dump($var);
429436
430437
.. image:: /_images/components/var_dumper/06-constants.png
438+
:alt: Dump output with the "E_WARNING" constant shown as value of "severity".
431439

432440
.. code-block:: php
433441
@@ -441,6 +449,7 @@ then its dump representation::
441449
dump($var);
442450
443451
.. image:: /_images/components/var_dumper/07-hard-ref.png
452+
:alt: Dump output showing the referenced arrays.
444453

445454
.. code-block:: php
446455
@@ -451,6 +460,7 @@ then its dump representation::
451460
dump($var);
452461
453462
.. image:: /_images/components/var_dumper/08-virtual-property.png
463+
:alt: Dump output of the ArrayObject.
454464

455465
.. code-block:: php
456466
@@ -464,6 +474,7 @@ then its dump representation::
464474
dump($var);
465475
466476
.. image:: /_images/components/var_dumper/09-cut.png
477+
:alt: Dump output where the children of the Container object are hidden.
467478

468479
.. _var-dumper-advanced:
469480

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ 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
81+
argument "SOME_OTHER_SECRET".
8082

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

contributing/code/stack_trace.rst

Lines changed: 5 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,9 @@ 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"
106+
and "Stack Traces" tabs.
107+
:class: with-browser
107108

108109
Since stack traces may contain sensitive data, they should not be
109110
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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ 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
14+
full stacktrace and log information.
15+
:class: with-browser
1616

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

2121
.. 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
22+
:alt: A typical error page in the production environment.
23+
:class: with-browser
2524

2625
Error pages for the production environment can be customized in different ways
2726
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

0 commit comments

Comments
 (0)