jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.8k stars 3.39k forks source link

ICML Writer: AltText not written for images #6607

Open lrosenthol opened 4 years ago

lrosenthol commented 4 years ago

The ICML Writer does not add the necessary ObjectExportOption object to set the AltText for images to comply with accessibility requirements.

eg.

<ObjectExportOption AltTextSourceType="SourceCustom" CustomAltText="The Adobe Logo">
    <Properties>
        <AltMetadataProperty NamespacePrefix="$ID/" PropertyPath="$ID/" />
    </Properties>
</ObjectExportOption>

pandoc 2.10.1 Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5

jgm commented 4 years ago

Can you give an example of pandoc's current output for an image and exactly how you'd change it?

lrosenthol commented 4 years ago

@jgm So there are two parts to making this work...

1 - As noted in the initial issue, there is a chunk of XML that needs to be added to the ICML output, the ObjectExportOption element. This just gets added as a sibling of the Image element. I can do this work pretty easily, now that I am getting familiar with pandoc & Haskell.

However...

2 - InDesign itself has a bug where it doesn't read the ObjectExportOption element from ICML - only from IDML and IDMS. I am working with the InDesign team to get this fixed for an upcoming update, but having this code working will give them something to test against and make sure it works as expected.

iandol commented 2 years ago

@lrosenthol — was this ever fixed? Also can ICML utilise any other attributes that could be added to the pandoc AST?