Information Required ?
avatar ColinM2
ColinM2
9 Jul 2020

In a multilingual site showing flage for the languages the title= and the alt= have identical text strings. This causes an accesibility error. One solution solution is to leave the title= text blank or perhaps to add the word 'title' or its equivalent in the relevant language.

I appreciate this is perhaps considered as a minor issue compared to a real fault but it would be an enhancement to Joomla! if there attention is given to minimising accessibility issues, especially in these challenging times.

Expected result No accessibilty 'fault'

Actual result

System information (as much as possible)

Additional comments

avatar ColinM2 ColinM2 - open - 9 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jul 2020
avatar brianteeman
brianteeman - comment - 9 Jul 2020

Can you please highlight the accessibility issue with this. A link to the relevant WCAG guideline if at all possible would be great

avatar astridx
astridx - comment - 10 Jul 2020

As relying on the title attribute is currently discouraged: Do we need this attribute at all?

avatar brianteeman
brianteeman - comment - 10 Jul 2020

Probably not but I would still like to know which WCAG rule this breaks

avatar Quy Quy - labeled - 18 Jul 2020
avatar jwaisner jwaisner - change - 20 Jul 2020
Status New Information Required
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 20 Jul 2020
avatar Quy Quy - change - 20 Jul 2020
Labels Added: Information Required
avatar Quy Quy - labeled - 20 Jul 2020
avatar Quy
Quy - comment - 23 Jul 2020

The title attribute displays the tooltip and alt for the image.

@brianteeman OK to close in this case?

30061

<img src="/joomla-cms-staging/media/mod_languages/images/en_gb.gif" alt="English (United Kingdom)" title="English (United Kingdom)" />

avatar brianteeman
brianteeman - comment - 24 Jul 2020

@Quy I am not the accessibility team so it should be their decision.
There is no rule that I am aware of saying that this is bad for accessibility just various comments that having identical title and alt texts is redundant

avatar ColinM2
ColinM2 - comment - 25 Jul 2020

Have been away! Looked for applicable WCAG rule. Seemss many think it is a 'warning/ poor practice'. So up to the accessibility people.

avatar brianteeman
brianteeman - comment - 25 Jul 2020

If anything my preference would be to keep the title and replace the alt with ""

avatar ColinM2
ColinM2 - comment - 27 Jul 2020

Think that would resolve it OK.

avatar Quy Quy - change - 4 Sep 2020
Labels Added: ?
avatar Quy Quy - labeled - 4 Sep 2020
avatar brianteeman
brianteeman - comment - 5 Sep 2020

Any chance of the accessibility team responding here?

avatar SharkyKZ
SharkyKZ - comment - 5 Sep 2020
avatar chmst
chmst - comment - 5 Sep 2020

Regarding this one https://www.w3.org/WAI/WCAG21/Techniques/html/H36 I'd say that the alt attribute and not title is correct. But the title does not break a rule, at least I cannot find such a rule. So I think that is not an issue to have both.

A personal remark: If I am on a site with many flags, I am quite content to see the language title on hover as I do not know all flags of (for me) exotic countries.

avatar hans2103
hans2103 - comment - 6 Sep 2020

I stumbled upon a nice alt Decision Tree
The decision tree describes how to use the alt attribute of the <img> element in various situations. For some types of images, there are alternative approaches, such as using CSS background images for decorative images or web fonts instead of images of text.

https://www.w3.org/WAI/tutorials/images/decision-tree/

avatar zwiastunsw
zwiastunsw - comment - 7 Sep 2020

If anything my preference would be to keep the title and replace the alt with ""

Why? Since when does the attribute "title" transmit alternative text? What HTML or WCAG rule or technique recommends this? Who is it for? And for what? Because if it is to serve as a text alternative, it is an alt text, not a title. If you want it to serve as a "vision" for the programmer, you can do anything. There you need the text instead of the image, not the title of the graphics.
A typical discussion about nothing.
All functions where the title attribute carries the same information as alt attribute should be improved.

avatar jwaisner jwaisner - change - 14 Sep 2020
Status Information Required Discussion
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2020
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 14 Sep 2020
avatar jiweigert
jiweigert - comment - 14 Sep 2020

As accessibility improvement,
the Alt text for the language flag (or any other image should be descriptive),
Having here at moment e.g. 'English (United States)' better would be 'Selected language: ' als alternative text.
The point is not only to just to desribe an option, but having it describe in a proper way for visual impared users.

And the original propose in HTML for the "alt"-attribute, was always to deliver a descriptive text to describe the image,
in case it can't be loaded or, in this case can't be seen. And that was way before, they even had think about to take care of accessibility.

The title came much later and have a different purpose than the alt text.

And design / layout considerations should be applied here, because again we talking here about supporting technologies, like screen readers, braille writers, etc. which cares more about a semantically correct HTML-structure than any fancy blinky blue color / layout or
css-positioning technology.

I would like, when the team would go in favor of the alt attribute.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30061.
avatar brianteeman
brianteeman - comment - 14 Sep 2020

if the image is only decorative then it should have an alt of ""

avatar jiweigert
jiweigert - comment - 14 Sep 2020

Don't we havn't had that discussion about the meaningless representation of
a country flag image for language not before?

And the language is what a user select to be able to read (or get presented
to him by accessibility functionality/ devices) the content.

So yes, the flags are just a poor representation and pure decorative,
because there is no image which stands for a specific language and that is
what a user want to choose from, if available.

So at least, the alt-attribute should explain (or describe) as alternative
that:

a) the presented content is by default in a specific language: '
"Default content language: Language(sub-language)"'
or short:
'"Default: Language(sub-language)"'

b) when the user selected a specific language:
'"Selected content language: Language(sub-language)"'
or short:
'"Selected: Language(sub-language)"'

And of course, the appropriate labels for the surrounding form and the
Select-Tag.

It's kind of sad to see this kind of discussion coming up, every time again.
Either the use country flags as misrepresentation of languages (which is
born way back in the history of the internet and mostly accepted or,
as another example,
the misuse of the asterisk-sign as a indication for a required field in
times, when there was no easy way to tell the user that a specific field is
required.

But since years now, even before the last version jump of Joomla(3.5?/3.8?),
there is the required-attribute, which tells browser to signal to the user,
that this field have to be filled out.
And this can be and are used in a wide range of (accessibility) devices/
browsers.
It make simply no sense, to not support it, on Server-Side the developer
has anyway to prove, sanitize and validate the transferred input.
The asterisk is just a deprecated historical visualisation artifact,
nothing more.

Sorry for this rant and off topic.
But sometimes, I feel that the argument of B/C break is just an excuse in
many aspects...

Have a nice day!

Brian Teeman wrote Mo., 14. Sep. 2020, 22:29:

if the image is only decorative then it should have an alt of ""

avatar jiweigert
jiweigert - comment - 14 Sep 2020

Alternatively, if there is a way to include the country flags, if "needed",
but in a way that it's not be interpreted/ read out at all by accessibility
devices/ browser.

So, no image tag, but implemented as background image/ icon or any
appropriate way to have this just as visual "help" for the selected option,
which should have the above mentioned label / attribute accessibility texts.

avatar zwiastunsw
zwiastunsw - comment - 15 Sep 2020
  1. Add a language selection list
  2. Set up the configuration: text or graphics
  3. If text - no problem
  4. if graphics - hide the text visually, show the graphics

Add a description of the graphics using tooltips - not title, not alt, but tooltip.
Graphics in this case will not only be decorative. It is informative. It needs a text alternative. Placing it as a tooltip using aria-describedby with a reference to the hidden text in the list of languages will be a solution for both assistive technology users and sighted users.

avatar zwiastunsw
zwiastunsw - comment - 15 Sep 2020

PS desccribedby may indicate either the name of the language in the list or more complete descriptive information visible only in tooltip. In the latter case, even if the user of the screen reader reads the text from the list and the description, it will be two complementary information.

Text in tooltip must be short, e.g. American English

avatar zwiastunsw
zwiastunsw - comment - 15 Sep 2020

Why is this a bad solution?

avatar Quy Quy - close - 15 Nov 2020
avatar Quy
Quy - comment - 15 Nov 2020

Please test PR #31275

avatar Quy Quy - change - 15 Nov 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-11-15 16:54:37
Closed_By Quy

Add a Comment

Login with GitHub to post a comment