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

YUICONFIG is an invalid HTML attribute

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_26_STABLE

      Description

      Issue Description

      Certain pages that use YUI trees in Moodle fail to validate because an invalid HTML attribute called yuiconfig is used in LI tags. Although I am only reporting it here for the Assignment module, the issue exists in the following sections of code:

      • /blocks/private_files/renderer.php
      • /mod/assign/renderer.php
      • /mod/assignment/renderer.php
      • /mod/wiki/renderer.php
      • /user/renderer.php

      Expected Behaviour

      The markup be written in such a way that the HTML code pass W3C HTML validation.

      Steps to Reproduce

      1) Create an assignment activity in a course.
      2) Upload a file on the assignment page.
      3) Notice that the HTML contains code similar to the following:

      <li yuiConfig='{"type":"html"}'>

      ... which was generated by Moodle PHP code similar to the following:

      $result .= '<li yuiConfig=\'' . json_encode($yuiconfig) . '\'>'

      Standard

      WCAG 2.0 4.1.1 - Parsing
      http://www.w3.org/TR/2013/NOTE-UNDERSTANDING-WCAG20-20130905/ensure-compat-parses.html

      G134: Validating Web pages
      http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G134

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              michael-milette Michael Milette
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: