Vial and vile are easily confused words.
The spell-check application of most word processing software programs would not catch a slip-up of these two words. Spell-check is looking for words that aren’t in its dictionary, and words that resemble words in its dictionary but are possibly spelled wrong. Spell-check isn’t perfect. It doesn’t know and can’t guess what word you wanted or what word you meant, it can only judge the words on the page. If you used words that are all spelled correctly, it gives you a pass anyway.
Autocorrect suggests words that start with the same letters. It’s suggesting what word you may want to save time, but quite often, its suggestions are pretty off base. They don’t help you out, but they do make you laugh.
Vial is a noun. It means an enclosed tube for holding liquids, for example, blood samples.
Vile is an adjective. It describes something literally repulsive, gross, revolting, or disgusting. For example, bodily fluids are vile to many people. In a more figurative sense, vile can describe something a person finds heinous, disgusting, or extremely offensive: gross humor, vulgar language, or poor manners towards others.
The following story uses both words correctly:
Villette found cleaning up broken vials of blood a particularly vile task.