tags:

views:

153

answers:

1

On some of my pages I am setting focus on a first input element:

      $(':input:visible:first').trigger('focus');

If the first input element is a checkbox or a radiobutton it receives a focus fine but that's not clearly visible, so it's label is not highlighted and screen reader doesn't recognize that, too, i.e. it doesn't read out that field. Is there any way using JQuery to make focus on checkbox or radoibuttons more pronounced?

+2  A: 

Can't you assign a suitably clear css class to it?

  $(':input:visible:first').focus(function() {
                               $(this).addClass("superClear")
                            })
                           .blur(function() {
                               $(this).removeClass("superClear");
                           }).focus();

Also, this might be helpful:

http://stackoverflow.com/questions/43643/how-do-i-style-css-radio-buttons-and-labels

karim79
Will it work in IE7?
Victor
The last time I checked, IE7 supported CSS - so yes it should.
karim79
Thanks for reply. Yes, this will help visually but screen reader still doesn't recognize control has a focus, like it does when you tab onto it manually
Victor
@Victor - please see my edit. I think you should find the linked question useful (I hope, anyway).
karim79
Yes, I find it helpful, thanks
Victor