Electrical smell on 2004 Hyundai Accent

I smell an electric smell that comes from under the dash board everytime I put my foot on the brake for a long period of time, such as at a red light. I do not smell the smell any other time other than this. What could cause this and how serious is this problem.

Asked by for the 2004 Hyundai Accent