Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: fix reStructuredText syntax for figures #5386

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

EZoni
Copy link
Member

@EZoni EZoni commented Oct 10, 2024

While reviewing some of our documentation PRs, I noticed that we use the :alt: (alternate text) syntax in a way that might be neither optimal nor consistent with the reStructuredText figure examples:

.. figure:: picture.png
   :scale: 50 %
   :alt: map to buried treasure

   This is the caption of the figure (a simple paragraph).

As a reminder, the reStructuredText image docs describes alternate text as

Alternate text: a short description of the image, displayed by applications that cannot display images, or spoken by applications for visually impaired users

Before this PR, this is the output when an image is displayed:
Screenshot from 2024-10-10 15-16-25

Before this PR, this is the output when an image is not displayed (e.g., due to a typo in the docs):
Screenshot from 2024-10-10 15-20-20

After this PR, I would propose to have this output when an image is not displayed (e.g., due to a typo in the docs):
Screenshot from 2024-10-10 15-34-00

I think this is a better output for both users that read the docs (avoid reading the caption twice) and visually impaired users (avoid hearing the caption twice - the real caption is spoken too).

Note that in some cases we do not yet provide a caption. I believe we should add a caption to all figures, but I left this out of this PR.

@EZoni EZoni added component: documentation Docs, readme and manual cleaning Clean code, improve readability labels Oct 10, 2024
@EZoni EZoni requested a review from ax3l October 10, 2024 23:18
@EZoni EZoni force-pushed the docs_figures branch 2 times, most recently from c20b4e7 to ac671e7 Compare October 10, 2024 23:21
@EZoni EZoni changed the title Docs: fix reStructuredText syntax for figures [WIP] Docs: fix reStructuredText syntax for figures Oct 11, 2024
ax3l pushed a commit that referenced this pull request Oct 11, 2024
Could we do this to make sure that we run the GitHub Actions and Azure
jobs (build, test) only if _at least one file outside the_ `Docs`
_directory_ is modified, i.e., skip those jobs if only files in the
`Docs` directory are modified?

I think it would be safe to do so (and a bit of a waste of resources to
not do so...), but I leave it open for discussion.

If merged, we could test this rebasing #5386 and seeing if the correct
CI jobs are skipped.

Note that this PR leaves the other CI jobs untouched, e.g., `source`,
`docs`, `CodeQL`, etc.
@EZoni EZoni requested review from RemiLehe and removed request for ax3l October 12, 2024 00:57
@EZoni EZoni assigned RemiLehe and unassigned ax3l Oct 12, 2024
@EZoni
Copy link
Member Author

EZoni commented Oct 12, 2024

Need to double check if the skipping of CI build/test jobs (#5387) worked out well and if can do more on it.

@EZoni EZoni changed the title [WIP] Docs: fix reStructuredText syntax for figures Docs: fix reStructuredText syntax for figures Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Clean code, improve readability component: documentation Docs, readme and manual
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants