Skip to content
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

add support for new 'image-description' XForm form media type #759

Open
tiritea opened this issue Feb 26, 2025 · 0 comments
Open

add support for new 'image-description' XForm form media type #759

tiritea opened this issue Feb 26, 2025 · 0 comments

Comments

@tiritea
Copy link

tiritea commented Feb 26, 2025

As discussed on ODK Forum, this is to add XLSForm support for a adding a new form type to ODK XForm spec to allow a (translatable) string description to be assocaited with media image, ostensible for the purpose of supporting such things as screen readers (eg Enketo, Web Forms) but possibly also to provide dynamic form content descriptors in Collect.

This new string field can be mostly just passed straight (and localizable) thru pyxform today as just another supported 'media' type without significant changes., provided the new type (and there seems a reasonable consensus to call it image-description) is added to the list of supported medi types. As with the existing big-image media type, a new image-description media type should prerequisite the existence of a corresponding image; that is, you cannot specify image-description (or for that mater big-image) without already specifying an image. However, the converse is not true; you can still specify an image without an image-description (or big-image).

As discussed, it also seems reasonable to provide a suitable shortcut/alias in XLSForm for the full media::image-description(::lang), eg image-description or image-description::French (fr)

The proposed XLSForm extensions and expected resulting XML XForm definitions are:

ImageDescription_Proposed.xlsx

ImageDescriptionTranslated_Proposed.xlsx

ImageDescription_Proposed.xml.zip

ImageDescriptionTranslated_Proposed.xml.zip

Providing an image-description without specifying an image, either in the main survey or when associated with a choice list option, should result in a suitable fatal error, much the same as happens today if you specify a big-image without an image in the survey:

pyxform.errors.PyXFormError: To use big-image, you must also specify an image for the survey element named {self.name}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant