jupyter-book
jupyter-book copied to clipboard
[ENH ] - Add alt text for logo
Context
I am not sure if this should go here or in https://github.com/executablebooks/sphinx-book-theme, but I assume this affects both, so I would raise it here (let me know if this is incorrect, and I will move it)
When setting a new Jupyter-book, one has the flexibility to customise and config their project through a _config.yml
file.
One of such configurations is the ability to set a logo for the book, which is placed on the navbar so:
#######################################################################################
# Book settings
title : My Jupyter Book # The title of the book. Will be placed in the left navbar.
author : The Jupyter Book community # The author of the book
copyright : "2022" # Copyright year to be placed in the footer
logo : "" # A path to the book logo
However, there is no way (at least I have not found it) to set an alt
text for this to be accessible to those using screen readers and another assistive tech.
Proposal
Extend the _config.yml
schema so that one can also pass an alt
text for the logo, such as:
logo: "" # A path to the book logo
logo-alt-text: "" # An alt-text description of the logo
Admittedly I have not looked at how the config is parsed, and then the schema passed onto the rest of the code so I am not sure how much effort this would take.
Tasks and updates
- [ ] Extend the
_config.yml
schema to allow for an alt-text description for the logo - [ ] Parse the new config entry and pass it onto the
src
so that this is set within the navbar - [ ] Document this new addition
I would be happy to help if needed so ping me 👋🏽
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
I believe this has been sorted out so will close this issue 🙏🏽 thank you folks