From 7caa7c917e52b186bb8e4c3d2617c74b33fbd2ee Mon Sep 17 00:00:00 2001 From: Philipp Tessenow Date: Tue, 22 Apr 2014 15:12:46 +0200 Subject: [PATCH] replace prototype with jquery in accessibility.js to test this change, you should enable impaired mode for your test user --- app/assets/javascripts/accessibility.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/accessibility.js b/app/assets/javascripts/accessibility.js index e7faf99713..340336ca72 100644 --- a/app/assets/javascripts/accessibility.js +++ b/app/assets/javascripts/accessibility.js @@ -26,11 +26,8 @@ // See doc/COPYRIGHT.rdoc for more details. //++ -$(document).observe('dom:loaded', function() { - // If there is a flash message, give focus - // necessary for screen readers - var flash_focus = $$('div.flash a').first(); - if (flash_focus != undefined) { - flash_focus.focus(); - } +// If there is a flash message, give focus it. +// This is necessary for screen readers. +jQuery(function() { + jQuery('div.flash a').first().focus(); });