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

Labels for Atto editors do not focus the editor when clicked

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Open any page with an atto editor
      2. Enter some text into it and click off the editor
      3. Click on the label for it
        • Confirm that the editor is now focused
      4. Toggle the HTML view to hide the editor and show the text area
      5. Click elsewhere
      6. Click on the label for the textarea
        • Confirm that the textarea is now focused
      7. Toggle the HTML view to hide the editor and show the text area
      8. Click elsewhere
      9. Click on the label for it
        • Confirm that the editor is now focused
      10. Edit /lib/form/editor.php, find the <textarea line and add:

        aria-labelledby="timhunt andrewnicols mdl-46917"
        

      11. Refresh a page with an editor on
      12. Inspect the editor area (the bit you type in)
        • Confirm that the div has an aria-labelledby containing the values set above, plus a yui one (the YUI one is the ID generated for the <label> attribute)
      Show
      Open any page with an atto editor Enter some text into it and click off the editor Click on the label for it Confirm that the editor is now focused Toggle the HTML view to hide the editor and show the text area Click elsewhere Click on the label for the textarea Confirm that the textarea is now focused Toggle the HTML view to hide the editor and show the text area Click elsewhere Click on the label for it Confirm that the editor is now focused Edit /lib/form/editor.php, find the <textarea line and add: aria-labelledby="timhunt andrewnicols mdl-46917" Refresh a page with an editor on Inspect the editor area (the bit you type in) Confirm that the div has an aria-labelledby containing the values set above, plus a yui one (the YUI one is the ID generated for the <label> attribute)
    • Affected Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-46917-master

      Description

      When you click on a <label> it should put keyboard focus on the corresponding element.

      You can test this in many places in Moodle, but a question type is what I happened to be looking at.

      If you click the "Question label" then that input box gets focussed.

      If you click the "Question text" label, then nothing happens.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            timhunt Tim Hunt
            Peer reviewer:
            Tim Hunt
            Integrator:
            Damyon Wiese
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: