The field for alternative text

When alternative text for image is not necessary, should I write "" in the field or keep the field empty? For example Dialog cards.

otacke's picture

I think neither. Leaving the field empty will not include any alt tag at all, which is not recommended. Using "" will use it HTML encodeded as alt="""" (which is a bug in itself).

@BV: It feels that this is a case where H5P Group should do two things:

  • Sanitize the images' alt text, so it's not rendered HTML encoded.
  • Set `alt=""` if no alt text is given to implicitly assume the image is meant to be decorational and not relevant for the dialog card.


  • Replace using the internal image widget with using H5P.Image (which does the above)