?
avatar PhilETaylor
PhilETaylor
8 Jan 2021

Steps to reproduce the issue

Using the media managers new "No description" tick box when selecting an image gives markup of

<p><img src="images/joomla_black.png" alt="" /></p>

Screenshot 2021-01-08 at 22 26 31

however if you then right click that inserted image in TinyMCE (because intuitive double click does nothing)

Screenshot 2021-01-08 at 22 27 47

and select "Image" context menu item you get another popup with "Image is decorative" unchecked

Screenshot 2021-01-08 at 22 28 22

If I then check that checkbox and click save the generated markup is now

<p><img role="presentation" src="images/joomla_black.png" alt="" width="225" height="50" /></p>

So the question is, should the Joomla Media Manager be adding role="presentation" when the "No description" checkbox is ticked?

avatar PhilETaylor PhilETaylor - open - 8 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2021
avatar PhilETaylor PhilETaylor - change - 8 Jan 2021
Title
[4b6] role=presentation?
[4b6] role=presentation? when an image is decorative only.
avatar PhilETaylor PhilETaylor - edited - 8 Jan 2021
avatar PhilETaylor
PhilETaylor - comment - 8 Jan 2021

Tagging @brianteeman as it seems you were close to this?

avatar PhilETaylor
PhilETaylor - comment - 8 Jan 2021

This would also apply I guess to the rendering of other images with other checkboxes like these:

Screenshot 2021-01-08 at 22 32 32

avatar brianteeman
brianteeman - comment - 9 Jan 2021

role=presentation is an alternative method to alt=""

However its not as widely supported so the current code from joomla is perfectly correct


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31924.

avatar brianteeman
brianteeman - comment - 10 Jan 2021

This should be closed as not an issue

avatar chmst chmst - change - 10 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-10 10:50:29
Closed_By chmst
avatar chmst chmst - close - 10 Jan 2021
avatar chmst
chmst - comment - 10 Jan 2021

I wanted to move it to discussion but seems that github is not ready for that

avatar PhilETaylor
PhilETaylor - comment - 10 Jan 2021

The issue is that joomla now has two totally different ways of doing the same thing (marking an image as decorative only) that are incompatible with each other.

Enabling through media manager doesn't add the role so tinymce doesn't believe it's a decorative image.

The quick fix would be for joomla to add the alt and the role. From my googling that is not invalid syntax and just covers all bases.

If tinymce is going to remain shipped as the default editor it makes sense to be compatible with its features

Moving issues to discussions is a feature that has been revoked by GitHub after they found that comments were lost during the process occasionally. I hear they are recoding and that feature will return.

Add a Comment

Login with GitHub to post a comment