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

Prevent activity name to be read twice by screen reader in course content.

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-80384-403
    • MDL-80384-main
    • Hide

      Note

      • This is easier to test on Firefox

      Setup

      1. Create a course C1
      2. Add 2 activities (a resource R1 and an assignment A1)

      Test: Editing mode turned off

      1. Go to the course homepage. Make sure that the editing mode is turned off.
      2. Hover on the icon of an activity.
      3. Confirm that a tooltip that shows the activity type is not displayed.
      4. Right-click on the icon of an activity.
      5. On the context menu, select "Inspect Accessibility Properties"
      6. Check the "listitem" element in the accessibility tree that is associated with the activity you're inspecting.
      7. Confirm that the accessible name of the list item only mentions the activity name
      8. Expand the listitem node on the accessibility tree.
      9. Confirm that it does not contain an image element pertaining to the activity icon

      Test Editing mode turned on

      1. Turn on editing mode
      2. Hover on the icon of an activity.
      3. Confirm that a tooltip that shows the activity type is displayed.
      4. Right-click on the icon of an activity.
      5. On the context menu, select "Inspect Accessibility Properties"
      6. Check the "listitem" element associated with the activity you're inspecting.
      7. Expand the listitem node on the accessibility tree.
      8. Confirm that it contains an image element pertaining to the activity icon with an accessible name of "[activity type] icon" (e.g. for an assignment, it would be "Assignment icon"
      Show
      Note This is easier to test on Firefox Setup Create a course C1 Add 2 activities (a resource R1 and an assignment A1) Test: Editing mode turned off Go to the course homepage. Make sure that the editing mode is turned off. Hover on the icon of an activity. Confirm that a tooltip that shows the activity type is not displayed. Right-click on the icon of an activity. On the context menu, select "Inspect Accessibility Properties" Check the " listitem " element in the accessibility tree that is associated with the activity you're inspecting. Confirm that the accessible name of the list item only mentions the activity name Expand the listitem node on the accessibility tree. Confirm that it does not contain an image element pertaining to the activity icon Test Editing mode turned on Turn on editing mode Hover on the icon of an activity. Confirm that a tooltip that shows the activity type is displayed. Right-click on the icon of an activity. On the context menu, select "Inspect Accessibility Properties" Check the " listitem " element associated with the activity you're inspecting. Expand the listitem node on the accessibility tree. Confirm that it contains an image element pertaining to the activity icon with an accessible name of " [activity type] icon " (e.g. for an assignment, it would be " Assignment icon "
    • 1
    • HQ 2024 Sprint I1.3 Moppies

      Link to the original post: https://moodle.org/mod/forum/discuss.php?d=453377

      Post text:

      Looking at the code in moodle 4.3 the link to a resource/activity is now output twice.

      Once on the icon, and then on the text link.

      As a screen reader user, this means the link is announced twice and displayed twice in the links menu, as there are now 2 anchor tags to the same item in the HTML.

      Bootstrap has the stretched-link class, which was used appropriately in previous versions of Moodle, without having to output one link for the icon and another for the actual text link.

      More information:

      The stretched link cannot be used anymore because it will cover the advanced controls like the visibility or the group mode badges (added in 4.3). This is why the activity icon has a link on its own.

      However, the icon link should be ignored by screen readers because it is redundant.

        1. (1) 3 Passed -- (Main)MDL-80384.png
          83 kB
          Kim Jared Lucas
        2. (1) 7 Passed -- (Main)MDL-80384.png
          150 kB
          Kim Jared Lucas
        3. (1) 9 Passed -- (Main)MDL-80384.png
          81 kB
          Kim Jared Lucas
        4. (2) 3 Passed -- (Main)MDL-80384.png
          95 kB
          Kim Jared Lucas
        5. (2) 8 Passed -- (Main)MDL-80384.png
          140 kB
          Kim Jared Lucas
        6. image-2024-01-08-12-23-20-372.png
          48 kB
          Laurent David
        7. image-2024-01-29-14-58-32-527.png
          39 kB
          Laurent David
        8. image-2024-01-29-14-58-55-925.png
          39 kB
          Laurent David
        9. image-2024-01-29-15-00-03-309.png
          8 kB
          Laurent David
        10. image-2024-02-13-12-15-01-367.png
          21 kB
          Laurent David
        11. image-2024-02-13-12-16-20-642.png
          19 kB
          Laurent David
        12. image-2024-02-22-10-20-17-310.png
          57 kB
          Laurent David
        13. image-2024-03-06-12-36-50-966.png
          71 kB
          Laurent David
        14. screenshot-1.png
          56 kB
          Mikel Martín Corrales
        15. screenshot-2.png
          40 kB
          Laurent David
        16. Screenshot 2024-02-20 at 09.36.56.png
          1.50 MB
          Stuart Lamour
        17. Screenshot 2024-02-20 at 09.36.56-1.png
          1.50 MB
          Stuart Lamour
        18. Screenshot 2024-02-28 at 09.30.31.png
          99 kB
          Stuart Lamour
        19. Screenshot 2024-02-28 at 09.30.31-1.png
          99 kB
          Stuart Lamour
        20. Screenshot 2024-02-28 at 09.30.31-2.png
          99 kB
          Stuart Lamour
        21. Screenshot 2024-02-28 at 09.31.17.png
          93 kB
          Stuart Lamour
        22. Screenshot 2024-02-28 at 09.31.17-1.png
          93 kB
          Stuart Lamour
        23. Screenshot 2024-02-28 at 09.31.17-2.png
          93 kB
          Stuart Lamour
        24. Screenshot 2024-03-12 220617.png
          59 kB
          Gareth J Barnard
        25. screenshot-3.png
          57 kB
          Laurent David

            laurent.david@moodle.com Laurent David
            tusefomal Ferran Recio
            Mikel Martín Corrales Mikel Martín Corrales
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            2 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 3 hours, 21 minutes
                2d 3h 21m

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