ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

UI Link/MetaBar Language Selection: Support language for links (A11Y)

Open mjansenDatabay opened this issue 3 years ago • 8 comments

Depends on https://github.com/ILIAS-eLearning/ILIAS/pull/4653

This PR consists of two parts (and yes, maybe they could have been provided in two separate PRs).

  1. The UI Link components have been extended to accept optional language attributes for the Label and for the content provided when the link Action is executed.
  2. The MetaBar Item components of the GlobalScreen have also been been extended to accept optional language attributes for the Title (not named Label like in the UI components) and for the content provided when the link Action is executed.

Concrete Usage: As a first usage I provided these language attributes for the Language Selection in the Public Area.

Why?

https://www.w3.org/WAI/GL/WCAG20/translation/instructions_html:

The hreflang attribute indicates the language of content targeted by links. It is helpful though not required to add this information to links for which the target will not be translated in this process. If the link text also is not translated (e.g., because it is a formal title that should be kept in the original language), you should also add the language attributes to the anchor element.

mjansenDatabay avatar Feb 23 '22 22:02 mjansenDatabay

Thanks a lot for your feedback @klees / @Amstutz . I was totally aware that there might be many remarks :-). It was just an idea that popped up yesterday evening :-).

@chfsx Anything to add related to the GS?

mjansenDatabay avatar Feb 24 '22 08:02 mjansenDatabay

@mjansenDatabay The idea is nice indeed =)

The sheer number of remarks does not relate to the validity of the idea, though. For bad ideas, the number of remarks might be just one: "Hell no!". I hope our numerous feedbacks here just help to make a good idea even better...

klees avatar Feb 24 '22 09:02 klees

@klees

Inheritance: Why do we need to repeat the methods getLabelLanguage and friends on Bulky and Standard? Can't we just add them to Link

Because I initially thought that this is strongly coupled to the Label, and the label related methods are duplicated in the link types. But of course the Language can be moved to the base interface (which I already did).

mjansenDatabay avatar Feb 24 '22 11:02 mjansenDatabay

@chfsx

Do all hasTitle items in GS need the $title_language feature?

I'll provide separate interfaces/traits.

Do all hasAction items in GS need the $action_content_language feature?

I'll provide separate interfaces/traits.

mjansenDatabay avatar Feb 24 '22 12:02 mjansenDatabay

TODO:

  • [x] LanguageTag data type (which will take a while, because the RFC has to be studied and implemented / Current Status: We'll maybe have an option for funding)
  • [x] Interface/Trait for the UI Framework

mjansenDatabay avatar Feb 24 '22 13:02 mjansenDatabay

Just to make sure, that we are not stranded in a deadlock here, you are working on the LanguageTag, @mjansenDatabay , right? Feel free us to look over this if ready.

Amstutz avatar Mar 17 '22 12:03 Amstutz

Just to make sure, that we are not stranded in a deadlock here, you are working on the LanguageTag, @mjansenDatabay , right? Feel free us to look over this if ready.

Yes, I added the current status to my latest comment :-). We'll maybe have funding for the new data type, Oliver has to get in contact with the funding party.


Update: We scheduled the impl. of a LanguageTag.

mjansenDatabay avatar Mar 17 '22 13:03 mjansenDatabay

The language tag will be added with this PR: https://github.com/ILIAS-eLearning/ILIAS/pull/4653

Once it got approved I will rebase this PR here and integrate the new data type.

mjansenDatabay avatar Jun 13 '22 17:06 mjansenDatabay

Updated branch to use the new LanguageTag data type. @klees, @Amstutz, @chfsx As all open issues are resolved with this, please add your review for this PR.

lscharmer avatar Dec 12 '22 12:12 lscharmer

@chfsx I changed the comparison.

lscharmer avatar Dec 12 '22 13:12 lscharmer

@klees / @Amstutz Any objections left? @chfsx is happy (at least I hope so ;-)) and all review remarks from @klees have been addressed.

mjansenDatabay avatar Jan 10 '23 07:01 mjansenDatabay

@Amstutz volunteered to add an example: https://mantis.ilias.de/view.php?id=36252 Thx, y'all!

klees avatar Jan 11 '23 14:01 klees

@klees If you did not begin, yet, you could ask @lscharmer.

mjansenDatabay avatar Jan 11 '23 15:01 mjansenDatabay