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

YUICONFIG is an invalid HTML attribute

XMLWordPrintable

    • MOODLE_26_STABLE

      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

            dobedobedoh Andrew Lyons
            michael-milette Michael Milette
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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