User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Removal of an orphaned "alt"
Füge ein "Full Image" zu einem Artikel hinzu und schau Dir den HTML Code oder benutze einen Syntax-Checker
Error: Duplicate attribute alt.
'alt="" alt itemprop="'
No Error while HTML Syntax Checking
None
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
Title |
|
so rather than having to specify specifically "No Description" for the image, why doesn't it just default to alt="" if there's no alt text supplied? One less thing the user then has to do when adding an image.
That is absolutely the opposite of what should be done. The author must make a conscious decision if an image is decorative or not and if it is not then they must enter a suitable description.
You dont make your website accessible by simply ignoring (and therefore hiding) images.
Previously Joomla did exactly what you suggest and defaulted to alt=""
The problem with that is that its not a conscious decision and perhaps more importantly will pass any accessibility checker so you will never be prompted to fix your site and to make it accessible for all.
Responsible web design is making your content available for everyone and not, as in your suggestion, just to those with vision.
Please read https://magazine.joomla.org/all-issues/october-2020/an-image-is-worth-a-thousand-words
In summary. If the image is not decorative and you "forget" to add an alt description then no accessibility checker will ever be able to tell you that you "forgot". Hence the bugfix
Can someone tell me what I need to do so that no height/width information is output? I have not discovered a way to do this in the backend. I then created an override, which was the reason why I looked into the code in the first place.
regarding the changes in #30784 that led to this.
Actually @brianteeman initiated those changes (if you cared reading the responses on the PR you linked you would have seen it) and I think he's explained it in details also here in the above comments
I then created an override
Override is always the right answer in joomla (adding options is always the wrong one!!!)
Does this really mean that height/width is always output by default and this behavior cannot be turned off via backend? I find the size assignment with these attributes directly in the source code under aspects of the image scaling in certain constelations very obstructive, at least if I can't turn it off.
Does this really mean that height/width is always output by default and this behavior cannot be turned off via backend
YES, the reason is that browsers actually require the exact width and height of any image! It can be disabled by overriding OR when choosing an image deselect the lazyload checkbox (but don't do that, will affect the performance of your site).
I find the size assignment with these attributes directly in the source code under aspects of the image scaling in certain constelations
Use CSS something like this
.someClass {
max-width: 100%;
height: auto;
}
OR when choosing an image deselect the lazyload checkbox (but don't do that, will affect the performance of your site).
I search and search, but can't find it. Can you give me a hint where to find the lazyload checkbox?
I search and search, but can't find it. Can you give me a hint where to find the lazyload checkbox?
Select a new image and check all the options before closing the Modal, it's there
No, there is no such option!
And please dont forget: We are talking about "Full Image", The image selection dialog behaves differently here than when inserting an image normally
For the full image and intro image ALL the changes can be done with an override
Than the comments in the code doesnt make sense
Than the comments in the code doesnt make sense
??? Context?
There is a comment:
"// Set lazyloading only for images which have width and height attributes"
It suggests that you as a user have a choice, which you don't have with "Full-Image
It suggests that you as a user have a choice, which you don't have with "Full-Image
As a site visitor you get whatever was decided by the author of the site.
As an author you have the option to Override the default behaviour and do the 2010 version of an image, eg without width, height and an empty alt. If you're asking for more switches, sorry I'm the wrong guy for this, bye
Thanks for updating my POV on it @dgrammatiko and @brianteeman
#30874 had so much going on the discussion you're referring to I think might have been in amongst clusters of comments that GitHub closed up while I was trying to find it.
I'll go add a note to add concepts of lazyloading and the new alt text features to https://docs.joomla.org/Adding_an_image_to_an_article.
Meanwhile, another test is needed to allow this to be merged and take the excess alt out of the rendered code.
Can the PR creator, i.e. me, also test or does that violate guidelines?
the PR creator is supposed to have already tested it
it needs 2 other testers
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
In fact we already have 2 testers.
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-06 08:24:53 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
|
Tks.
I have tested this item✅ successfully on ea3c2a0
Works correctly. Stray alt introduced in #30784 removed.
Question though for @dgrammatiko regarding the changes in #30784 that led to this.
So much looked to go on in #30784 this might have been something overlooked.
Another PR would be needed as a result to modify line 26 to change the generation of $alt and further change the implementation of $images->image_fulltext_alt_empty which then becomes redundant as the fallback will always be alt="" if there's no alt text.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32587.