As an accessibility researcher, this subject is pretty close to my heart. When I designed Formall, the first priority was given to make sure that the HTML which would create good looking forms would also create accessible and user friendly forms. Things like where to put errors and how to indicate required fields don’t go wrong that often, but they can be done much better then you see in practice.
One of the most painful jobs of front end development, I always found to be styling forms across different browsers. The CSS rules on how forms should be styled leave much to the imagination of browser vendors. So I’ve attempted to put together a style sheet that can take some of the work out of our hands. It is literally saving me hours of work every form I have to create.
Every function has it’s own scope. A place where we can declare variables that are only available within the function it’s self. We’ve already seen how this can create private variables in a constructor. But there is much more to be said about variable visibility.