apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
66 stars 73 forks source link

Make clear if a link opens in a new tab #659

Closed mtthwhggns closed 3 years ago

mtthwhggns commented 4 years ago

Guideline 3.2 of WCAG says that links should only open in new tabs where it's necessary and technique H83 says the user should be warned of this.

I just spotted that in course/templates/course/course_base.html we are opening links from the advert in target="_blank" with no warning, but whoever does this could quickly grep te codebase for _blankto see if there are any more.

If things need to open in a new tab, adding words like

(opens in a new tab)

after the link text should suffice.

markkuriekkinen commented 4 years ago

If a course has added links to the course menu, they open in a new tab if the target is outside the A+ site. They can be LTI services or normal links. The text "opens in a new tab" does not really fit well into the course menu.

This popped up to my mind: many websites use a small graphical icon next to links that refer to sites outside the current site. Can such icons be made accessible?

The WCAG guideline doesn't seem to differentiate links within the site and outside the site. If the link opens in a new tab, the user should be warned.

mtthwhggns commented 4 years ago

In my opinion, a tiny graphic is ok for sighted users, I'd suggest hiding it with aria-hidden, then adding the (opens in a new tab) inside an .sr-only span, so that it appears as part of the text for assistive technology, but doesn't appear to users looking at the screen.

raphendyr commented 4 years ago

WDAP course uses local CSS to add such a symbols https://plus.cs.aalto.fi/iwdap/2020-spring/R1_introduction/02_more_intro/ .

I think that might be a good idea for those links in the menu, that do lead to external sites. However, most LTI etc should open first a A+ page with the "yep, I want to go there". Though, those local pages are still opened with _blank, I think.