Forum Moderators: open
The second problem is that the client is demanding 100% validity but is requesting something which would force invalidity (if you want good cross-browser support) - so the two demands are diametrically opposed. You can't have it both ways in this instance.
The final problem is your approach - the answer to your question is yes, you can use Javascript to hide the code and therefore make your document validate, but there is a difference between a document that validates and one that is valid. You are proposing simply to hide the fact that you are using invalid CSS - you are just going to fool a validation tool into showing an incorrect result.
I would recommend that you speak to your client and explain the situation, firstly by emphasising the importance of the focus indicator, and secondly by confronting him with the choice between having a valid and accessible site or an invalid site with reduced accessibility.
If we all loved default browser styles as much as you seem to, then CSS wouldn't exist. Do you object to styling a:focus with something other than an ugly dotted outline? And how the heck does the outline around a:active aid in accessibility?
Anyway my question was about javascript if anyone cares to help.