Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72885

Languages in language selection menu are missing lang attribute

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-72885-master-2
    • Hide
      Setup
      1. Log in as an admin
      2. Go to Site admin > Languages > Language packs
      3. Install at least two languages (e.g. Japanese (ja), Português - Brasil ‎(pt_br)‎ etc) take note the languages' code (e.g. ja, pt_br)
        • You may need to run cron if you install multiple language packs at once.
      Test on Boost and Clean
      1. Make sure your language is set to English.
      2. Log out and go to the site home.
      3. Expand the language menu and inspect its menu items.
      4. Confirm that the links have a "lang" attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br")
      5. Go to the Login page
      6. Expand the language menu and inspect its menu items.
      7. Confirm that the links have a "lang" attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br")
      8. Log in as a user
      9. Expand the language menu and inspect its menu items.
        • On Boost, the language menu is within the user menu
      10. Confirm that the links have a "lang" attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br")
      Show
      Setup Log in as an admin Go to Site admin > Languages > Language packs Install at least two languages (e.g. Japanese (ja), Português - Brasil ‎(pt_br)‎ etc) take note the languages' code (e.g. ja, pt_br) You may need to run cron if you install multiple language packs at once. Test on Boost and Clean Make sure your language is set to English. Log out and go to the site home. Expand the language menu and inspect its menu items. Confirm that the links have a " lang " attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br") Go to the Login page Expand the language menu and inspect its menu items. Confirm that the links have a " lang " attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br") Log in as a user Expand the language menu and inspect its menu items. On Boost, the language menu is within the user menu Confirm that the links have a " lang " attribute with the value matching the language code, but hyphenated (e.g. "ja" -> "ja", "pt_br" -> "pt-br")
    • 0
    • HQ Team International CIH2-225

      When 2 or more languages are installed in Moodle, a language selection menu is normally added to the custom menu. The languages in the dropdown menu are listed in their respected language. So far, this works great!

      However, the listed languages do not have a lang="xx" attribute causing screen readers to be unable to read the list of languages correctly. This is an accessibility issue.

      In addition, the links for these languages contain a redundant title attribute which is always identical to the link text. Some screen readers may be configured to read title tags resulting in the text being read twice. This is also an accessibility issue.

      Example:
      {{<a class="dropdown-item" role="menuitem" href="https://example.com/admin/search.php?query&lang=de" title="Deutsch ‎(de)‎">Deutsch ‎(de)‎</a>}}

      {{<a class="dropdown-item" role="menuitem" href="https://example.com/admin/search.php?query&lang=en" title="English ‎(en)‎">English ‎(en)‎</a>}}

      {{<a class="dropdown-item" role="menuitem" href="https://example.com/admin/search.php?query&lang=fr" title="Français ‎(fr)‎">Français ‎(fr)‎</a>}}

        1. image-2022-06-07-10-29-05-303.png
          63 kB
          Aya Saad
        2. MDL-72885_master.webm
          4.32 MB
          Angelia Dela Cruz
        3. MDL-72885_v311.webm
          3.28 MB
          Angelia Dela Cruz
        4. MDL-72885_v400.webm
          3.46 MB
          Angelia Dela Cruz

            jpataleta Jun Pataleta
            michael-milette Michael Milette
            Aya Saad Aya Saad
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 47 minutes
                1d 47m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.