On 4/15/2025 5:24 PM, Pablo Rodriguez via ntg-context wrote:
On 4/14/25 11:57, Steffen Wolfrum wrote:
There is an improvement: now the tags are identified as <Figure> and
<Formula>!
But still the figures label={this is a cow} is missing.

Sorry, Steffen, I thought I explained this in a previous message.

Alternative text is missing from \externalfigure, because this is the
generated PDF object:

   17 0 obj
   <<
     /K [ <<
           /Alt <FEFF0063006F0077>
           /MCID 1
           /Pg 1 0 R
           /Type /MCR
         >> ]
     /P 15 0 R
     /Pg 1 0 R
     /S /image
   >>
   endobj

But it should read:

   17 0 obj
   <<
     /K [ <<
           /MCID 1
           /Pg 1 0 R
           /Type /MCR
         >> ]
     /Alt <FEFF0063006F0077>
     /P 15 0 R
     /Pg 1 0 R
     /S /image
   >>
   endobj

All I know is that it has to be fixed in lpdf-tag.lmt, but I don’t know
how to fix it.

you can move the Alt and test

        local d = pdfdictionary {
            Type = pdf_mcr,
            Pg   = pageref,
            MCID = last,
        }
        parent.dict.Alt  = pdfunicode(label ~= "" and label or "image")

It is the same for alternative texts in formulas for PDF/UA-1.

you can play with

             -- Alt        = alternate,
                NS         = namespace,
                ActualText = actualtext or nil,

                Alt        = actualtext or nil,
                NS         = namespace,
             -- ActualText = actualtext or nil,

and such to see if your viewer does soemthing useful

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to