Details
-
Bug
-
Resolution: Fixed
-
Major
-
13.1
-
None
-
Unknown
-
N/A
-
N/A
-
Pull Request accepted
-
-
4.1.2 Name, Role, Value
Description
We faced an a11y issue while BITV examination (german wcag). In german localisation the id="likers" has some weird attributes:
- title (completely empty)
- gefällt
- mir"
- anzeigen"
I guess this has something to do with the quotation marks in the translation file. In xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-ui/src/main/resources/XWiki/Like/LikeTranslations.de.xml I found only one matching pattern in line #44:
like.unlike.modal.viewLikersButton="Gefällt mir" anzeigen
In xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-ui/src/main/resources/XWiki/Like/LikeViewersMenuUIX.xml I found the line #170:
#submenuitem($doc.getURL('view','viewer=likers'), $services.localization.render('like.unlike.modal.viewLikersButton'), 'likers', '', 'heart')
I guess this creates the title attribute for id "likers" and the text after the <span class="fa fa-heart"></span>.
What doesn't exactly match: that bad attribute 'gefällt' starts with a lower case letter but in LikeTranslations.de.xml it's an upper case letter.
To make it more visible here an image:
We fixed it temporarily with a script:
// bei "Gefällt mir"-anzeigen im 3-Punkte-Menü sind die Anführungszeichen in den Attributen verkehrt gesetzt try { let likers=document.querySelector("#likers"); likers.removeAttribute('gefällt'); likers.removeAttribute('mir"'); likers.removeAttribute('anzeigen"'); likers.setAttribute('title', '"Gefällt mir" anzeigen'); } catch (e) { console.log('Kein "gefällt mir"-anzeigen gefunden') }