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

print_heading_with_help puts the helpbutton inside the h2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: Accessibility
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The print_heading_with_help function prints <h2> that contains the helpbutton inside it.

      This is an accessibility bug: accessibility software uses headings to produce lists that users can jump to, and these can become confusing or less useful if they have spurious text in them (from the help button). It's also a structural bug as obviously the help button is not really part of the heading text conceptually either.

      I have attached a patch which fixes this issue while maintaining the same appearance (in standard theme). It works by adding an extra div class="heading-with-help" around the h2 and the helpbutton.

      Issue: This patch may break some themes. Most notably, if a theme tries to make headings left-aligned, it will need an extra style to make the .heading-with-help left-aligned too. Is that a problem? I don't know...

      I am suggesting this for inclusion in 2.0 (although it could be 1.9.x if there are accessibility goals for that release series).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10