st1020 / kita

Kita is a clean, elegant and simple blog theme for Zola.
https://st1020.github.io/kita/
MIT License
41 stars 12 forks source link

Add optional cover image captions #20

Closed IamPhytan closed 1 month ago

IamPhytan commented 1 month ago

Give the option to provide a caption for the cover image on a page. If provided, this caption is also used as an alternate text, increasing the accessibility for any user with a screen reader.

st1020 commented 1 month ago

Thanks for your PR.

According to the MDN documentation, "The title attribute is not an acceptable substitute for the alt attribute. Additionally, avoid duplicating the alt attribute's value in a title attribute declared on the same image. Doing so may cause some screen readers to announce the same text twice, creating a confusing experience.".

So, I think the title attribute should not be set, and the frontmatter key should be cover.alt.