bug? Block: Text -> image error 'title' vs. 'alt-text' (redactor error?)
can someone replicate this:
C5 version 220.127.116.11, when I add a TEXT-BLOCK to a page and insert an image in the textblock. The editor asks for a TITLE of the image. I enter something - but the generated HTML code does not contain this text as TITLE but as ALT-TEXT instead.
When I insert an IMAGE-BLOCK I can add a title and alt-text. The generated html is correct then.
I need this "html"-feature to display text on mouse-over on image.
It isn't a bug, it is a typo. It should refer to "Alt Text", "Alt Attribute", or something similar.
This a typo by the makers of Redactor, not concrete5.
The alt attribute is more important for SEO and accessibility, so I don't see a lot of energy being used to add title into Redactor.
The title attribute could be added into redactor.js. It can be more easily added using a plugin.
How badly do you need it?
it's not the first time I am creating a page for this company. I was asked how a "mouse-over-image-text" can be accomplished in C5 (5.7). "It worked in 5.6" ....
As the title can contain additional informationI suggest that the title can be added there as well (together with the alt-text) - as this is possible "by default" for the image-block.
How badly I need this? As I am unaware of other simple (so simple that the customer can to it himself) methods - quite badly ... just to answer your question.
I understand, that you do not have hands on the redactor but as described above: for the image-block it works and it's quite nasty to add a text-block, then an image-block and then continue with a text-block if you could do the same just by adding an image to the text-block.
It will work this way
- mouse drag select the image (so it is highlighted)
- click the plugin button in the toolbar
- add the title in the popup
that would probably work.
Still leaves me the question why the basic HTML tag (title) of the image can not be set using the default editor when inserting an image into a text-block-area - but is offered in the window, when inserting a image-block area.
thank you very much. I had to search where to configure the redactor editor, but once I found this it works in design mode, but not on the visitor-page (I created another screencast: mp4, 900kb). I can set the value in different ways (which one would be correct?) - but it does not show up. I am switching to a Chrome private window to demonstrate the visitor view in the end.
Try doing it without clicking Edit first.
I am really sorry to say - for me (at this time) it does not work.
I have uploaded another screencast demonstrating. Browser here: Chrome.
Method 1: Sec 11 to 14: marking from post to pre-image html tag by dragging mouse. I give that area a title (test), switch to HTML view, but nothing is there.
Method 2: Sec. 35, I am marking the image only (dragging), I am adding title "test 2", switching back to HTML - still nothing there.
Screencast (560 kb, mp4):http://dl.olaf-noehring.de/?t=dcb13d63a1ca6680b69184cf17d84e7e...
Am I doing something wrong?
It makes me think there is a problem on your end.
Out of curiosity, switch to the Elemental theme and see if it works. There must be something interfering.
well, no - this time - switching to Elemtal theme did not work. I also tried Chrome and Firefox for editing. Same effect: Your popup window opens, but when I enter something this something does not show up in the html.
I will send you a PM with credentials - maybe you find the time and curiosity to check it out.
When you save, the image is getting checked to see if it needs to be placed in a responsive <picture> element or a regular <img> element. With either choice, the image is being replaced and the replacement doesn't keep the previous attributes.
If you go into the code view and type in an attribute like class, ID, title, etc., the attribute will not be saved when the responsive image replaces it.
This is a bug with responsive images. I am going to make a GitHub issue for it.
thanks for checking and for letting me know the bad news. Hopefully it will be fixed.
As a warning, I don't imagine this issue is going to be a super high priority. There are other more pressing issues that will be put ahead of it, so it might take some time.
Personally I am hoping for a fix because the attribute stripping breaks my Redactor plugin for adding classes and ID's on images.
thanks for submitting the bug. I see it the same way - there are much more pressing things to do first.