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
Extract image alternate text from keydef linktext #2752
Comments
Looking into this one, the current code inserts the alternate text directly inside Gets a bit trickier here because technically, the deprecated |
This one was bugging me so I kept thinking about it. My eventual logic may be partly related to the fact that all the keyref link text processing is in the
With that in mind -- @jelovirt or @raducoravu any thoughts on this commit as a fix for the current bug? It currently breaks the integration tests because we've got a sample in there that changes, but I could fix that in a pull request. This one has been tested with key definitions that are referenced by an image, where the definition:
Each of those 5 conditions tested with an image with no alt text, with |
I'm ok with that fix. |
👍 There is a little bit of duplicate code between the two "writeAlt" methods, maybe a "writeAlt" which could received two parameters, the content as Element and the content as String, and depending on which one is not null, output that one... |
For the duplicate code -- I've just used the same pattern we already have for For specializations - we should not worry about that just for this case. The same theoretical issue comes up in almost any DITA processing that changes markup, so we shouldn't do something special here. For example - almost any DITA keyword/term/link/xref element could be specialized with |
@robander Ok. |
Fix for #2752 pull alt text from key definition
Fixed in #2814. |
According to this email exchange on the DITA TC list, according to DITA 1.3 spec:
If in my DITA Map I have a key definition:
and in a DITA topic I have a keyref to it:
the image
<alt>
element should be computed automatically from the<linktext>
set on the keydef<topicmeta>
.The text was updated successfully, but these errors were encountered: