From 8eaa70f8d9b1825aebd8aad6cf930d94ec528e45 Mon Sep 17 00:00:00 2001 From: Sterling Cobb Date: Wed, 21 May 2014 09:29:58 -0600 Subject: [PATCH] accessiblity touch ups when copying a course fixes CNVS-12188 When you are migrating a course and using voice over in safari it was really confusing because when you selected 'copy course' and did a course search or a course select, the results would be read we everything else on the page. This fixes that. Test Plan As a teacher or someone who can run a migration Given you are using safari with voice over When you import content into a course And you select the content type of 'Copy a Canvas Course' And you search for a course by its name by using the field Then voice over should tell you there are results And when you use the arrow keys to select one of those results Then only the selected result should be read by voice over And the all of the form items should not be read ---------------------------------------------------- As a teacher or someone who can run a migration Given you are using safari with voice over When you import content into a course And you select the content type of 'Copy a Canvas Course' And you select a course in the course select dropdown And when you use the arrow keys to select one of those results Then only the selected result should be read by voice over And the all of the form items should not be read Change-Id: Id2c265d900ee9676094e221fa9dd38e8a61a843a Reviewed-on: https://gerrit.instructure.com/35240 Tested-by: Jenkins Product-Review: Hilary Scharton QA-Review: Clare Strong Reviewed-by: Jeremy Stanley --- .../subviews/CourseFindSelectView.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/coffeescripts/views/content_migrations/subviews/CourseFindSelectView.coffee b/app/coffeescripts/views/content_migrations/subviews/CourseFindSelectView.coffee index 537d8f59d7c..f07f1f2ce74 100644 --- a/app/coffeescripts/views/content_migrations/subviews/CourseFindSelectView.coffee +++ b/app/coffeescripts/views/content_migrations/subviews/CourseFindSelectView.coffee @@ -35,6 +35,15 @@ define [ @$courseSearchField.data('ui-autocomplete')._renderItem = (ul, item) -> $(autocompleteItemTemplate(item)).appendTo(ul) + # Accessiblity Hack. If you find a better solution please fix this. This makes it so the whole form isn't read + # by the screen reader every time a user selects an auto completed item. + $converterDiv = $('#converter') + @$courseSearchField.on 'focus', -> $converterDiv.attr('aria-atomic', false) + @$courseSearchField.on 'blur', -> $converterDiv.attr('aria-atomic', true) + @$courseSelect.on 'focus', -> $converterDiv.attr('aria-atomic', false) + @$courseSelect.on 'blur', -> $converterDiv.attr('aria-atomic', true) + ## hack finished ## + toJSON: -> json = super json.terms = @coursesByTerms