joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[4.0] CSP links open in a new window #28026

Closed brianteeman closed 2 years ago

brianteeman commented 4 years ago

There are a million and one reasons why links should not open in a new window link targets

TL;DR: Regardless of what accessibility conformance level you target, do not arbitrarily open links in a new window or tab. If you are required to do so anyway, inform users in text.

We are currently visually indicating this but we are not indicating it to screen readers.

You might think that screen readers were intelligent enough to recognise a target=_blank and say something to the user but they don't powermapper results

Elsewhere I have changed the code so that link has "title=open LINKNAME in new window"

For com_csp and plg_system_httpheaders it's not that easy.

The language string contains the link PLG_SYSTEM_HTTPHEADERS_HSTS="<a href='https://hstspreload.org' target='_blank' rel='noopener noreferrer'>HTTP Strict Transport Security (HSTS)</a>"

While I could update the string with the title the problem is that we have told translators NOT to translate the string.

Anyone have any clever ideas how to resolve this?

zero-24 commented 4 years ago

Isn't there a CSS class to add that external link indication? I don't remember wich it was.

If no other option works we can change the message to the translators ;-)

brianteeman commented 4 years ago

It's css so it's just a visual indication

zero-24 commented 4 years ago

Well i guess than we have to update the links / strings and update the translator message.

brianteeman commented 4 years ago

I am thinking of doing it a different way

Keep the labels as text only labels ADD links as the descriptions

zero-24 commented 4 years ago

Go for it when it is better for accessibility, top. I think this are a few settings where deeper knowledge / descriptions makes sense.

brianteeman commented 4 years ago

will put it on the todo list

brianteeman commented 4 years ago

Maybe the Accessibility team will do it. I don't have time