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

Accessibility toolkit throws type error when running analysis task

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • MDL-73629-master_color_errors
    • Hide
      1. After installing Moodle, ensure that "Enable accessibility tools" is turned on (checked) in the "Site administration / Advanced features" section.
      2. In the "Site administration / Plugins / Admin tools / Accessibility / Brickfield registration", ensure that you have registered your site.
      3. In the "Site administration / Plugins / Admin tools / Accessibility / Accessibility toolkit settings", ensure that you have "Enable analysis requests" enabled (checked).
      4. In a test course section description, add the following raw HTML content:
        <span style="color: -10234; background-color: 1050743;">This is content.</span>
      5. Save the content.
      6. In the same course, access the "Accessibility toolkit" selection from the course actions menu.
      7. If the course has not been submitted for analysis, press the "Submit for analysis" button.
      8. Run the "Process content analysis requests" scheduled task, either manually from the "Site administration / Server / Tasks / Scheduled tasks" page (preferred) or from the cron.
      9. Check there is no error while running the task (without the patch, the error "Argument 2 passed to tool_brickfield\local\htmlchecker\common\brickfield_accessibility_color_test::luminosity() must be of the type string, null given" is displayed).
      Show
      After installing Moodle, ensure that "Enable accessibility tools" is turned on (checked) in the "Site administration / Advanced features" section. In the "Site administration / Plugins / Admin tools / Accessibility / Brickfield registration", ensure that you have registered your site. In the "Site administration / Plugins / Admin tools / Accessibility / Accessibility toolkit settings", ensure that you have "Enable analysis requests" enabled (checked). In a test course section description, add the following raw HTML content: <span style="color: -10234; background-color: 1050743;">This is content.</span> Save the content. In the same course, access the "Accessibility toolkit" selection from the course actions menu. If the course has not been submitted for analysis, press the "Submit for analysis" button. Run the "Process content analysis requests" scheduled task, either manually from the "Site administration / Server / Tasks / Scheduled tasks" page (preferred) or from the cron. Check there is no error while running the task (without the patch, the error "Argument 2 passed to tool_brickfield\local\htmlchecker\common\brickfield_accessibility_color_test::luminosity() must be of the type string, null given" is displayed).

      As described in a forum post, under certain situations, the 'css_text_has_contrast" check can throw an invalid type error. This occurs of an HTML element has invalid colours specified, such as:

      <span style="color: -10234; background-color: 1050743;">

      As a workaround, find and fix those colour areas.

            mchurch Mike Churchward
            mchurch Mike Churchward
            Jay Churchward Jay Churchward
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 5 minutes
                2h 5m

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