transpect / CoCoTeX

luaLaTeX render backend for xerif
https://www.le-tex.de/en/xerif.html
BSD 2-Clause "Simplified" License
7 stars 1 forks source link

a11y: \ccaStructStart{MetaDatumBlock} not completely implemented in coco-title? #16

Open roberthechtletex opened 2 weeks ago

roberthechtletex commented 2 weeks ago

Shouldn't

\ccSetProperty{copyright}{%
    \ccaStructStart{MetaDatumBlock}%
    \ccIfComp{Copyright}
      {\ccUseComp{Copyright}\par}
      {\textcopyright\space\ccUseComp{Year}\space\ccUseComp{Publisher},\space\ccUseComp{PubPlace}\par}%
    \ccaStructEnd{MetaDatumBlock}%
  }%

rather look like this:

\ccSetProperty{copyright}{%
    \ccaStructStart{MetaDatumBlock}%
    \ccaStructStart{MetaDatum}%+
    \ccaStructStart{MetaDatumValue}%+
    \ccIfComp{Copyright}
      {\ccUseComp{Copyright}\par}
      {\textcopyright\space\ccUseComp{Year}\space\ccUseComp{Publisher},\space\ccUseComp{PubPlace}\par}%
    \ccaStructEnd{MetaDatumValue}%+
    \ccaStructEnd{MetaDatum}%+
    \ccaStructEnd{MetaDatumBlock}%
  }%

?

And/Or should the MetaDatumBlock rather span the whole \ccSetProperty{publisher} or even \ccSetProperty{imprint}?

roberthechtletex commented 2 weeks ago

I updated the kernel myself, as described above.

Still, this question remains: “And/Or should the MetaDatumBlock rather span the whole \ccSetProperty{publisher} or even \ccSetProperty{imprint}?”

LupinoTech commented 2 weeks ago

IIRC, the general idea was that MetaDatum and MetaDatumBlock are more-or-less exclusive, that is, one "Element" in the imprint is either a MetaDatum with a MetaDatumLabel and a MetaDatumValue, or a MetaDatumBlock. Both elements can however be inside a broader MetaDatumBlock, which in the standard definition is already the case for imprint as a whole, see ll.1180-1195 in coco-title.dtx. Think of MetaDatumBlock as an "recursively embeddable" container, while MetaDatum is a container for a key-value pair. It is however true that the cited declaration of the copyright Property should contain a P tag for the actual text. (MetaDatumValue and MetaDatumLabel don't need an extra P, as they are already mapped to P.)

LupinoTech commented 2 weeks ago

There is no real convention yet on what to do with "label-less" meta data… We could also tag them as MetaDatum instead of MetaDatumBlock and a simple P inside… I'm open to suggestions.