Modals

Alt text in auto galleries

3 months 3 weeks ago #78373

Claudio Romeo's Avatar Claudio Romeo

Please, forgive my poor English...
Accessibility is more and more important, so each image has to be described for visually impaired. OK.
But it seems to me that we have a problem with auto galleries from a folder.
In addition to creating _t previews files, I write the data.txt file, specifying the title and the description of each image.
I found no way to specify the alt text for each image.
In the options I can set the automatic alt text from the title or the description.
But the alt text for a visually impaired person has to be drastically different from both the title and the description. An example:
title: The Company Logo
description: The Company Logo recalls the sun and the sea and has been created by John Smith in 1963
alt: blue styled waves and a yellow sun with five sun rays
I tried to insert an alt line in the data.txt file, but it generates an data-modal-alt tag instead of the alt tag.
So, is there a way to specify the alt text in the data.txt file?
Or another solution for this problem?

Please, note that the alt text must refer to the thumbnail file.

3 months 3 weeks ago #78379

Peter van Westen's Avatar Peter van Westen Admin

Please try the latest development version from:
www.regularlabs.com/development-releases

You should now also be able to set the alt tags separately via the data.txt file:

title_apples=My special title for Apples
description_apples=Description especially for Apples
alt_apples=Separate alt text for Apples
The alt attribute will default to the title if no specific alt is set.

3 months 2 weeks ago #78453

Claudio Romeo's Avatar Claudio Romeo

Excuse for delayed response.
I tried your development version of Modal and it seems to be working fine.
Thank you!

3 months 2 weeks ago #78458

Peter van Westen's Avatar Peter van Westen Admin

Ok, great :)
The new feature will be included in the next release.

3 months 2 weeks ago #78500

Claudio Romeo's Avatar Claudio Romeo

After a few days, I wondered if you could make the modal galleries tag system even better for usability.
In my opinion the data.txt file should work in a slightly deeper way. Let's make an example with the myimage image: the texts within square brakets are my suggestions.

title_myimage=The title of myimage [this text should produce the data-modal-title tag used by modals and the title tag related to the large myimage]
description_myimage=The description of myimage [this text should produce only the modal-description class used by modals for the large myimage, as it does at the moment]
alt_myimage=The alternate text of myimage [this text should produce the alt tag related to the large myimage]
title_myimage_t=The title of the thumbnail of myimage [this text should produce the title tag related to the thumbnail of myimage, that can be different from the large image title tag]
alt_myimage_t=The alternate text of the thumbnail of myimage [this text should produce the alt tag related to the thumbnail of myimage, that can be different from the large image alt tag]

In this way, we can have the full control on the tags of the auto galleries images, making them perfectly accessible both when thumbnails and when large.
Please, note that some tags are needed by validation tests for accessibility (if not by human beings): when a page recalls an image, this image should have both the title and the alt tag.
What about these enhancements? Can they be achieved?

3 months 2 weeks ago #78501

Peter van Westen's Avatar Peter van Westen Admin

Please try the latest development version from:
www.regularlabs.com/development-releases

You should now be able to do:

title_myimage=The title of myimage
description_myimage=The description of myimage
alt_myimage=The alternate text of myimage
thumbnail_title_myimage=The title of the thumbnail of myimage
thumbnail_alt_myimage=The alternate text of the thumbnail of myimage

3 months 2 weeks ago #78519

Claudio Romeo's Avatar Claudio Romeo

I tried to install this new version, but a warning appears about installing a free version on a pro one.
Can I have the pro development version (as it was the previous)?

3 months 2 weeks ago #78520

Peter van Westen's Avatar Peter van Westen Admin

You can download the pro developer version there too... if you are logged in.

3 months 2 weeks ago #78521

Claudio Romeo's Avatar Claudio Romeo

So, it's clear: I'm more accessible than smart :unsure: :cheer:
I tested the new version.
The thumbnail title and alt tags are OK.
But the large image has the data-modal-alt tag (that it's unused by Modals, isn't it?) instead of the alt one.

3 months 2 weeks ago #78523

Peter van Westen's Avatar Peter van Westen Admin

Nope. If all is as it should be (and like I see in my tests), the data-modal-alt attribute is on the <a> tag. Modals uses this to create the alt attribute on the large image.

3 months 2 weeks ago #78524

Claudio Romeo's Avatar Claudio Romeo

Peter van Westen wrote:

Modals uses this to create the alt attribute on the large image.
Mumble...
OK, now I see: I have to inspect the large image element instead of simply examine the HTML code of the page. (I already told you I'm more accessible than smart.)
I confirm that all works correctly.
Thank you.

3 months 2 weeks ago #78525

Peter van Westen's Avatar Peter van Westen Admin

Great :)

The fix will be included in the next release.