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

Unexpected "Tables ideally should not be missing headers."

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-75724-311_toolbrickfield_tableheadercheck
    • MDL-75724-400_toolbrickfield_tableheadercheck
    • MDL-75724-401_toolbrickfield_tableheadercheck
    • MDL-75724-master_toolbrickfield_tableheadercheck
    • Hide

      Setup:

      1. To test this the site needs to be registered with Brickfield. If you don't have a Brickfield account, you can register here.
      2. Activate your site with Brickfield in "Site administration / Plugins / Admin tools / Accessibility / Brickfield registration" by entering the API and Secret keys.
      3. Enable analysis requests in "Site administration / Plugins / Admin tools / Accessibility / Accessibility toolkit settings"

      Table HTML:
      <table>
      <thead>
      <tr>
      <th scope="col">
      This is table heading
      </th>
      </tr>
      </thead>
      <tbody>
      <tr>
      <td>
      This is a tables data
      </td>
      </tr>
      </tbody>
      </table>

      Test:

      1. Create a new course
      2. Add a resource to the course, something that can be edited with the ATTO Editor. (Suggest using a Label resource.)
      3. Edit the resource and use the ATTO Editor to insert the included HTML table, and save.
      4. Add the "Accessibility review" block to the course.
      5. Click on the "Submit to Analysis" button to request that the course is analyzed by the accessibility toolkit.
      6. Run cron. (You should edit the brickfield cron tasks at Site administration > Server > Tasks > Scheduled tasks to run every minute to speed up this analysis process so that the brickfield task is run the very next time you run cron.)
      7. The table HTML will be flagged with an error for the check "Tables ideally should not be missing headers.".
      8. Update the tool_brickfield code with this patch.
      9. Now update the Tables resources content (Change "This is table heading" to "Table Heading"). This will prompt the toolkit to re-analyze the resource as it has been updated.
      10. Allow for cron to run so the course is re-analyzed.
      11. The HTML table should now pass the check it failed before.

      Alternate Test:

      1. Copy the admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php modified unit test from the patch links into the base Moodle install into the same directories.
      2. Run this unit test. Verify it fails.
      3. Install the patched version and rerun the same test.
      4. Verify the test that failed now passes.
      Show
      Setup: To test this the site needs to be registered with Brickfield. If you don't have a Brickfield account, you can register here. Activate your site with Brickfield in "Site administration / Plugins / Admin tools / Accessibility / Brickfield registration" by entering the API and Secret keys. Enable analysis requests in "Site administration / Plugins / Admin tools / Accessibility / Accessibility toolkit settings" Table HTML: <table> <thead> <tr> <th scope="col"> This is table heading </th> </tr> </thead> <tbody> <tr> <td> This is a tables data </td> </tr> </tbody> </table> Test: Create a new course Add a resource to the course, something that can be edited with the ATTO Editor. (Suggest using a Label resource.) Edit the resource and use the ATTO Editor to insert the included HTML table, and save. Add the "Accessibility review" block to the course. Click on the "Submit to Analysis" button to request that the course is analyzed by the accessibility toolkit. Run cron. (You should edit the brickfield cron tasks at Site administration > Server > Tasks > Scheduled tasks to run every minute to speed up this analysis process so that the brickfield task is run the very next time you run cron.) The table HTML will be flagged with an error for the check "Tables ideally should not be missing headers.". Update the tool_brickfield code with this patch. Now update the Tables resources content (Change "This is table heading" to "Table Heading"). This will prompt the toolkit to re-analyze the resource as it has been updated. Allow for cron to run so the course is re-analyzed. The HTML table should now pass the check it failed before. Alternate Test: Copy the admin/tool/brickfield/tests/local/htmlchecker/common/checks/table_data_should_have_th_test.php modified unit test from the patch links into the base Moodle install into the same directories. Run this unit test. Verify it fails. Install the patched version and rerun the same test. Verify the test that failed now passes.

    Description

      From forum post:

      I am getting a "Tables ideally should not be missing headers." from the Brickfield Accessibility tool.

      Here is the errant HTML

      <table border="1" cellspacing="0" cellpadding="0" class="generaltable">
      <thead>
      <tr>
      <th width="157" class="header" scope="col">
      Type of Assessment
      </th>
      <th width="157" class="header" scope="col">
      Name of Assessment or Exam
      </th>
      <th width="148" class="header" scope="col">
      Percentage of total assessment scheme
      </th>
      <th width="153" class="header" scope="col">
      Relevant TLOs
      </th>
      </tr>
      </thead>
      <tbody>
      <tr>
      <td width="157">
      Summative
      </td>
      <td width="157">
      Assessed Talk
      </td>
      <td width="148">
      40%
      </td>
      <td width="153">
      TLO 3
      </td>
      </tr>
      <tr>
      <td width="157">
      Summative
      </td>
      <td width="157">
      Written event plan and rationale
      </td>
      <td width="148">
      60%
      </td>
      <td width="153">
      TLOs 1, 2, 4
      </td>
      </tr>
      </tbody>
      </table>

      Can anyone help me understand why it is generating this error please, as I have thead and th elements.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mchurch Mike Churchward
            Mike Churchward Mike Churchward
            Mike Churchward, Karen Holland
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: