ILIAS
ILIAS copied to clipboard
UI Link/MetaBar Language Selection: Support language for links (A11Y)
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).
- The
UI Link
components have been extended to accept optional language attributes for theLabel
and for the content provided when the linkAction
is executed. - The
MetaBar
Item
components of theGlobalScreen
have also been been extended to accept optional language attributes for theTitle
(not namedLabel
like in the UI components) and for the content provided when the linkAction
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.
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 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
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).
@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.
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
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.
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
.
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.
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.
@chfsx I changed the comparison.
@klees / @Amstutz Any objections left? @chfsx is happy (at least I hope so ;-)) and all review remarks from @klees have been addressed.
@Amstutz volunteered to add an example: https://mantis.ilias.de/view.php?id=36252 Thx, y'all!
@klees If you did not begin, yet, you could ask @lscharmer.