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

html_table API should support caption tag

    Details

    • Testing Instructions:
      Hide
      1. Run PHPUnit test lib/tests/html_writer_test.php.
      2. Find a html_table - there's one in grade_report_grader::get_grade_table(), in grade/report/grader/lib.php
      3. Set the caption field.

      In Base and Bootstrapbase and both with LTR and RTL languages

      1. View the table.
        • Observe that the table's caption is visible.
        • Observe that the caption is left or right aligned depending on the selected language
      2. Fire up a supported screen reader and view the table.
        • Observe that the screen reader is aware of the table's caption when you mouse over it.
      3. Set the captionhide field to true and view the table again.
        • Observe that the table's caption is not visible.
      4. Tab through the page until you get to the table; your screen reader should announce the number of columns and rows in the table, as well as the table's caption (set the table's caption text to something memorable so you can pick it out of the noise!)
      Show
      Run PHPUnit test lib/tests/html_writer_test.php . Find a html_table - there's one in grade_report_grader::get_grade_table() , in grade/report/grader/lib.php Set the caption field. In Base and Bootstrapbase and both with LTR and RTL languages View the table. Observe that the table's caption is visible. Observe that the caption is left or right aligned depending on the selected language Fire up a supported screen reader and view the table. Observe that the screen reader is aware of the table's caption when you mouse over it. Set the captionhide field to true and view the table again. Observe that the table's caption is not visible. Tab through the page until you get to the table; your screen reader should announce the number of columns and rows in the table, as well as the table's caption (set the table's caption text to something memorable so you can pick it out of the noise!)
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-37477-master
    • Sprint:
      FRONTEND Sprint 15, FRONTEND Sprint 16, Team Beards Sprint 2
    • Issue size:
      Small

      Description

      The Table APIs should support a caption tag.

      This is both good practice as well as an accessibility requirement.

      Refer to the discussion in the linked issue for a specific case.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/May/15