HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.19k stars 2.9k forks source link

Need alt-tags (or accessible equivalent) for images #705

Closed Evansdoor closed 6 years ago

Evansdoor commented 6 years ago

It'd be wonderful if we could have a way to implement alt-tags on images (or a functional equivalent within the div tags - titles? - that's accessible to screen readers).

Bertbk commented 6 years ago

You can use the figure shortcode of Hugo coupled with alt

{{< figure src="path_to_file" title="My title" alt="Alternative Text">}}
Evansdoor commented 6 years ago

You can use the figure shortcode of Hugo coupled with alt

{{< figure src="path_to_file" title="My title" alt="Alternative Text">}}

Thanks for the suggestion, @Bertbk!

The problem is, I'm trying to add alt tags to all the images in my site, and I can't get shortcodes like this to work for images like the portrait in the About section, or the image_preview or image in the Project section. I get the usual "bare keys cannot contain '{' " error message.

bxie commented 4 years ago

@Evansdoor any luck getting alt text on images to work in Academic theme? If so, could you share any tips?

My colleagues and I really want to use Academic for our sites, but lack of support for alt-text is holding me back. Thanks!

Evansdoor commented 4 years ago

Hi @bxie No I'm afraid I had to give up on alt text. Sorry I didn't have better news.