JavaScript can facilitate search, form handling or product comparison. It is worth designing such functions so that they do not impede access to the basic content of the website.
Start with User Task
Before adding an interaction, determine what is to be improved by it. Filtering the directory can shorten the search for the product and a hint in the form help you enter the data correctly. The animation appearing on each scroll is not so obvious.
A well-functioning function gives a clear response to the action: shows the loading state, number of results or reason for the error. No reaction after clicking leaves the recipient in uncertainty, even if the processing is technically ongoing.
Keep page bases in HTML
Google describes JavaScript processing as a process involving downloading and rendering of the page. However, this does not mean that the content visible only after any interaction will always be read according to the author's intention.
A key description of the offer, headers and links should be made available as directly as possible. JavaScript can improve their service, instead of being the only way to provide basic information. This applies especially to content that is intended to constitute independent subpages.
Test more than mouse click
- Support keypad function and check focus visibility.
- See what happens when you go back in your browser.
- Check for no results, delayed response and aborted transfer.
- Rate messages on your phone, also with the screen keyboard open.
The filter, which loses the reading position after each change, may make it difficult to use the directory. The form should keep the entered data correctly after the error, unless there is a legitimate reason to delete them.
Agree Emergency Behavior
Not every function can work without scripts. Important to predict a clear message and an alternative way to perform a key task whenever possible. The choice of technology should be combined with technical preparation of content and templatesThe interaction is successful when it helps perform the action, and not only makes a good impression during a short presentation of the project.
