You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure where this issue actually lies (hugo vs. go-org). If this is the wrong repo, let me know.
I'm currently using hugo and org-mode to write blog posts. Note that I'm not using ox-hugo, but rather setting defaultMarkdownHandler = 'org' in hugo.toml. An issue I've run into is trying to find the correct way to provide alt text on images.
After a bit of experimentation, I figured out that the seemingly correct way to provide alt text for images was to supply the attribute alt to ATTR_HTML. However, the resulting HTML seems a bit odd to me. That said, I don't know how much this matters practice.
In the screenshot below, you'll see that the alt text is assigned to the link itself rather than the image, and the image is assigned the alt text of the file name provided in the org link's description.
* inline image with alt text
#+ATTR_HTML: :alt black mage rubbernecking bunny girl
[[file:./ffxiv-rubbernecking.png][file:./ffxiv-rubbernecking.png]]
When performing an export on the same file using org-html-export-as-html, the alt text is assigned to both the link description and to the image itself as shown by the HTML generated by the export:
When using alt text with an image without a description, it works as expected. However, this means my image is no longer clickable, so if the image was larger than the page, it wouldn't be possible to click on the image to see the larger version.
#+attr_html: :alt black mage rubbernecking bunny girl
[[file:./ffxiv-rubbernecking.png]]
For me, the expected behavior is that the the alt text is assigned the same way when using org-html-export when using the org syntax in the first example provided, though I don't know if what org-export is doing is actually correct either from an accessibility standpoint.
If any more information is needed, let me know.
The text was updated successfully, but these errors were encountered:
Thx for the great report and sorry for the late reply. Totally makes sense, it's just a special case; we handle something similar for paragraphs that contain nothing but a link and set the attributes on the link rather than the containing paragraph (code). I'll get around to this eventually, but currently too much other stuff to work on.
I'm not sure where this issue actually lies (hugo vs. go-org). If this is the wrong repo, let me know.
I'm currently using hugo and org-mode to write blog posts. Note that I'm not using ox-hugo, but rather setting
defaultMarkdownHandler = 'org'
inhugo.toml
. An issue I've run into is trying to find the correct way to providealt
text on images.After a bit of experimentation, I figured out that the seemingly correct way to provide alt text for images was to supply the attribute
alt
toATTR_HTML
. However, the resulting HTML seems a bit odd to me. That said, I don't know how much this matters practice.In the screenshot below, you'll see that the alt text is assigned to the link itself rather than the image, and the image is assigned the alt text of the file name provided in the org link's description.
When performing an export on the same file using
org-html-export-as-html
, the alt text is assigned to both the link description and to the image itself as shown by the HTML generated by the export:When using alt text with an image without a description, it works as expected. However, this means my image is no longer clickable, so if the image was larger than the page, it wouldn't be possible to click on the image to see the larger version.
For me, the expected behavior is that the the alt text is assigned the same way when using
org-html-export
when using the org syntax in the first example provided, though I don't know if what org-export is doing is actually correct either from an accessibility standpoint.If any more information is needed, let me know.
The text was updated successfully, but these errors were encountered: