Placeholder/alt text for images (eg screen readers)

My apologies! This check is new in pyxform v3. @Lindsay_Stevens_Au has been doing some good work to make sure we know what is expected to be supported and have tests around it.

I believe that adding image-description to that list would make the proposed forms work as expected but it might be best to double check that.

Yes, that matches my understanding.

Actually, after a bit of digging, it appears this check has been there - although in a slightly different manner - since Day 1(!). From https://github.com/XLSForm/pyxform/releases/tag/v0.10.0

pyxform-0.10.0.zip (1.6 MB)

So, unfortunately, there isn't any previous version of pyxform to test that this new form type will pass thru correctly into the XForm (that is, without now explicitly adding it in).

I could have sworn I remembered big-image working before we added explicit support for it! My apologies, I shouldn't work off memory for these things.

NP. I can barely remember what I had for dinner last night. :slightly_smiling_face:

1 Like

Actually, upon reflection, this might actually be something worth considering doing initially, simply because otherwise this will currently entail users adding a new column "media::image-description". But that is a little odd because strictly speaking the pure text that is provided isn't media per se.

Whereas adding a new column "image-description" (eg to populate <image alt="foo" ...> alternate text for any associated image) is a bit less mentally jarring IMO. And it would co-exist slightly better with the existing (aliased) "image" column, and therefore perhaps easier to explain.

That is,

image media::image-description
dog.jpg small dog by tree

vs

image image-description
dog.jpg small dog by tree

Thoughts?

1 Like

FYI, created an associated pyxform issue to add this, along with some additional error checks for when you try to specify image-description without a corresponding image.

And I hope to submit a PR for this imminently.

2 Likes

PR posted here: https://github.com/XLSForm/pyxform/pull/761