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.

            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.