Image title missing in true/false content type

Hi !

I was doing some testing with the apostrophe (see this post : https://h5p.org/node/1352449) and I noticed that the image's title is missing in the true/false content type.

When I create my true / false question, I can insert an image and give it a title on mousehover and an alt tag (screencap 1).
But the title is missing on the user's end (screencap 2).

Not a big deal at all, but I thought I should bring it up although ;)

Cheers,

Isa

(Wordpress Version 6.1.1 / H5P plugin up to date)

 

  
Content types: 
papi Jo's picture

That is a bug. In the H5P.TrueFalse-1.8 library, script h5p-true-false.js is missing one line in the Register task image block (I've added it in bold italics below)

// Register task image
            self.setImage(media.params.file.path, {
              disableImageZooming: params.media.disableImageZooming || false,
              alt: media.params.alt,
              title: media.params.title
            });

otacke's picture

No, that's not a bug.

That line was never added, because the title attribute causes too many issues with accessibility, and it will ultimately be removed from all H5P libraries. If one wants to have tooltips, a custom solution will need to be chosen (and H5P core will get support for one in order to maintain consistency and avoid redundancy).

Thanks for the clarification, Oliver ! I am not a big fan of the title tag nor of tooltips, but this is useful to legend an image. I use the title tag mainly to precise, if it is a painting for instance, the author, the title and the century, in order to educate my students. A caption would be a better way to do it as it is visible whereas the tooltip is "hidden" but there is no way to add a caption to images to my knowledge at least. (How come, by the way ?)

otacke's picture

Hi!

I don't think discussing this with me will help. I am not affiliated with the H5P core team and do not have any saying in what will be supported in what way or not for some reason. As I said, there will be a tooltip implementation that can be used instead of the title attribute - but again - I am just a forum visitor like yourself (who monitors what's going in the public H5P repositories and on the public H5P ticket system) and I don't know when that might be done and where that will be supported or why something is not being tackled at all.

Cheers,
Oliver

Thank you so much for the tip, Papi Jo : I have edit the file and now the title is populated :)

Cheers,

Isa