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

Do not use <fieldset> tag for form elements group that does not have a label

    XMLWordPrintable

Details

    • MOODLE_403_STABLE
    • MOODLE_404_STABLE
    • Hide
      1. Create a course and add an assign module
      2. Go to the module setting and find completion conditions
      3. Make sure there is no 'fieldset' tag without a legend there (see attachments)
      4. Make sure the buttons "Submit"/"Cancel" also do not have a fieldset without a legend
      5. On the same page the controls such as "Allow submissions from" should still have a fieldset tag with a legend
      Show
      Create a course and add an assign module Go to the module setting and find completion conditions Make sure there is no 'fieldset' tag without a legend there (see attachments) Make sure the buttons "Submit"/"Cancel" also do not have a fieldset without a legend On the same page the controls such as "Allow submissions from" should still have a fieldset tag with a legend
    • WP Sprint 2024-I1.2 (Atlantic)

    Description

      As raised by the accessibility audit, <fieldset> without a <legend> fails accessibility checks.

      We have added labels to some fieldsets in MDL-80192 . This issue is about not using this tag at all if the group does not need a label - for example, each element in the group already has one and the group element is only used to organise how we display them.

      It is probably not easy to backport such change since some themes or custom CSS may already use this tag and it will break them. This is why I'm creating it as an improvement and to be added to the next major version only

      Attachments

        1. (1) 5 Passed -- (Main)MDL-80431.png
          (1) 5 Passed -- (Main)MDL-80431.png
          258 kB
        2. fieldset_after.png
          fieldset_after.png
          155 kB
        3. fieldset_before.png
          fieldset_before.png
          149 kB
        4. fig1401.png
          fig1401.png
          9 kB

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              Paul Holden Paul Holden
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Kim Jared Lucas Kim Jared Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h

                  Clockify

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