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

    XMLWordPrintable

Details

    • WP Sprint 2023-I4.2 (Clones)

    Description

      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

      WAVE

      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">
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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