? Pending

User tests: Successful: Unsuccessful:

avatar ahotzler
ahotzler
4 Mar 2021

Pull Request for Issue # .

Summary of Changes

Removal of an orphaned "alt"

Testing Instructions

Füge ein "Full Image" zu einem Artikel hinzu und schau Dir den HTML Code oder benutze einen Syntax-Checker

Actual result BEFORE applying this Pull Request

Error: Duplicate attribute alt.
'alt="" alt itemprop="'

Expected result AFTER applying this Pull Request

No Error while HTML Syntax Checking

Documentation Changes Required

None

avatar ahotzler ahotzler - open - 4 Mar 2021
avatar ahotzler ahotzler - change - 4 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2021
Category Layout
avatar ahotzler ahotzler - change - 4 Mar 2021
Title
Removal of an orphaned "alt
Removal of an orphaned "alt"
avatar ahotzler ahotzler - edited - 4 Mar 2021
avatar ahotzler ahotzler - change - 4 Mar 2021
The description was changed
avatar ahotzler ahotzler - edited - 4 Mar 2021
avatar particthistle particthistle - test_item - 5 Mar 2021 - Tested successfully
avatar particthistle
particthistle - comment - 5 Mar 2021

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.

  • https://www.w3.org/WAI/tutorials/images/decorative/ and other sources shows that all images should have an alt tag, and if it's just a decorative image, the alt tag should be alt="" for improved A11y
  • 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.

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.

avatar brianteeman
brianteeman - comment - 5 Mar 2021

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

avatar brianteeman
brianteeman - comment - 5 Mar 2021

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

avatar ahotzler
ahotzler - comment - 5 Mar 2021

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.

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

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!!!)

avatar ahotzler
ahotzler - comment - 5 Mar 2021

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.

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

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;
}
avatar ahotzler
ahotzler - comment - 5 Mar 2021

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?

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

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

avatar ahotzler
ahotzler - comment - 5 Mar 2021

No, there is no such option!

avatar ahotzler
ahotzler - comment - 5 Mar 2021

And please dont forget: We are talking about "Full Image", The image selection dialog behaves differently here than when inserting an image normally

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

Screenshot 2021-03-05 at 10 00 54

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

For the full image and intro image ALL the changes can be done with an override

avatar ahotzler
ahotzler - comment - 5 Mar 2021

Than the comments in the code doesnt make sense

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

Than the comments in the code doesnt make sense

??? Context?

avatar ahotzler
ahotzler - comment - 5 Mar 2021

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

avatar dgrammatiko
dgrammatiko - comment - 5 Mar 2021

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

avatar particthistle
particthistle - comment - 6 Mar 2021

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.

avatar ahotzler
ahotzler - comment - 6 Mar 2021

Can the PR creator, i.e. me, also test or does that violate guidelines?

avatar alikon
alikon - comment - 6 Mar 2021

the PR creator is supposed to have already tested it
it needs 2 other testers

avatar joomdonation joomdonation - test_item - 6 Mar 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 6 Mar 2021

I have tested this item successfully on ea3c2a0


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

avatar infograf768 infograf768 - change - 6 Mar 2021
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 6 Mar 2021

In fact we already have 2 testers.

RTC


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

avatar infograf768 infograf768 - close - 6 Mar 2021
avatar infograf768 infograf768 - merge - 6 Mar 2021
avatar infograf768 infograf768 - change - 6 Mar 2021
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: ?
avatar infograf768
infograf768 - comment - 6 Mar 2021

Tks.

Add a Comment

Login with GitHub to post a comment