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

Better handling for deleting items from the current list with autocomplete element

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Create 3 official tags: cat, dog, chicken
      2. Add a blog post and play with the tags field on this page.
      3. Add these tags (don't save the form): "cat, mongoose"
      4. Use the keyboard to tab to the current tags list (cat, mongoose)
      5. Press up or down to select "mongoose" from the list of current tags.
      6. Tab away from the list of current tabs
      7. Tab back to the list of current tags, verify "mongoose" is remembered as the current item in the list.
      8. Delete "mongoose" by pressing enter
      9. Select cat using the up and down arrow keys
      10. Delete "cat" by pressing enter
      11. Verify that "cat" still shows as an autocomplete suggestion for the input field.
      12. Verify that "mongoose" does not show as an autocomplete suggestion for the input field.
      13. Re-add cat and mongoose as current tags
      14. Delete cat and mongoose by clicking on them with the mouse
      15. Verify that "cat" still shows as an autocomplete suggestion for the input field.
      16. Verify that "mongoose" does not show as an autocomplete suggestion for the input field.

      Show
      1. Create 3 official tags: cat, dog, chicken 2. Add a blog post and play with the tags field on this page. 3. Add these tags (don't save the form): "cat, mongoose" 4. Use the keyboard to tab to the current tags list (cat, mongoose) 5. Press up or down to select "mongoose" from the list of current tags. 6. Tab away from the list of current tabs 7. Tab back to the list of current tags, verify "mongoose" is remembered as the current item in the list. 8. Delete "mongoose" by pressing enter 9. Select cat using the up and down arrow keys 10. Delete "cat" by pressing enter 11. Verify that "cat" still shows as an autocomplete suggestion for the input field. 12. Verify that "mongoose" does not show as an autocomplete suggestion for the input field. 13. Re-add cat and mongoose as current tags 14. Delete cat and mongoose by clicking on them with the mouse 15. Verify that "cat" still shows as an autocomplete suggestion for the input field. 16. Verify that "mongoose" does not show as an autocomplete suggestion for the input field.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51821-master

      Description

      Noticed while testing MDL-51792 - there are some ways that the deleting items from the selected list of items could be improved.

      1. Keep track of whether items were in the offical suggestion list, or are newly created tags and remove the "newly created tags" from the suggestion list when they are deselected
      2. Change the aria-role for the selected items list when items cannot be deselected (and do not treat it like a multiselect list).
      3. When leaving and returning focus to the selected items list, remember the last active-descendant.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                16/Nov/15