Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19149

id likers: invalid attributes in german localization

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 14.0, 13.10.3
    • 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')
      }
      

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            Simpel Simpel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: