-
Notifications
You must be signed in to change notification settings - Fork 1
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
Alt text images #48
Alt text images #48
Conversation
This looks good to me, and does what we want it to. As a sort-of aside:
Would we therefore not want it to do something like: <p>
<figure id=_figure-1>
<img src="img.jpg" alt=figure caption/>
<figcaption>Figure 1: figure caption</figcaption>
</figure>
</p> i.e. populate the |
Thanks @AdrianDAlessandro! I feel it is important to include alt-text on images. Do you think we should link a alt-text guide for reference on the README? As Dan mentioned, I would also prefer to populate the |
Thanks @dc2917 and @SaranjeetKaur I've checked the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
README.md
Outdated
</p> | ||
``` | ||
|
||
Which will render as a centred image with the caption "Figure 1: figure caption". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention that it also becomes the actual Alt Text, in addition to the caption, important for screen readers, as mentioned?
This PR enables us to use
{: .no-caption }
as an attribute list after defining images for when we do not want there to be a caption.I will add the following to the README after #41 is merged:
Images are converted to figures automatically using the MkDocs Caption extension. This extension enables putting captions on tables and lists as well as images, however the most basic behaviour uses the image's Alt Text field to populate the figure caption.
For Example:
Will be converted to:
Which will render as a centred image with the caption "Figure 1: figure caption".
If you do not want the image to have a caption, you can label it as a
no-caption
class using an Attribute List. Reminder, it is important to include Alt Text for accessibility reasons.You can then add to the attribute list to further specify the style. A useful one is for centering images:
More information on image style options can be found in the Mozilla Documentation.
Close #46