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

Invalid language attribute on html tag for languages such as en_wp and de_kids


    • WP Sprint 2023-I4.2 (Clones)

      This issue was detected during accessibility audit on learner-facing pages in Workplace performed in August-September 2023 by AbleDocs.

      Invalid Language attribute

      The LANG attribute "en-wp" is not valid as "wp" is not a valid ISO country code

      By setting the appropriate language attribute it allows screen readers to pronounce words correctly

      Recommendation from AbleDocs:
      Set to a valid English subtype, en-AU or en-CA for example. If this website may be used in multiple countries either set the LANG to just "en" or have it determine the country code per organization

      List of valid languages: https://www.w3docs.com/learn-html/html-language-codes.html

      Example failures


      Nu Validator

      Error: Bad value de-kids for attribute lang on element html: Bad script subtag.
      From line 1, column 16; to line 3, column 51
      TYPE html>↩↩<html  dir="ltr" lang="de-kids" xml:lang="de-kids">↩<head
      Error: Bad value de_du for attribute lang on element a: The language subtag de_du is not a valid language subtag.
      From line 113, column 97; to line 113, column 287
                <a href="http://localhost:8000/login/index.php?lang=de_du" class="dropdown-item menu-action" data-lang="de_du" lang="de_du" role="menuitem" tabindex="-1" aria-labelledby="actionmenuaction-2">

            pholden Paul Holden
            marina Marina Glancy
            Pedro Jordao Pedro Jordao
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            0 Vote for this issue
            16 Start watching this issue


                Original Estimate - 0 minutes
                Remaining Estimate - 0 minutes
                Time Spent - 3 hours, 35 minutes
                3h 35m

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