3

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?

Victor
  • 985
  • 2
  • 28
  • 53

1 Answers1

2

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:

How do I style (css) radio buttons and labels?

Community
  • 1
  • 1
karim79
  • 339,989
  • 67
  • 413
  • 406
  • The last time I checked, IE7 supported CSS - so yes it should. – karim79 May 20 '10 at 19:57
  • 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 May 20 '10 at 20:04
  • @Victor - please see my edit. I think you should find the linked question useful (I hope, anyway). – karim79 May 20 '10 at 20:09