Diary and Dairy 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 suggests what word you may want to save time, but quite often, its suggestions couldn’t be more off base and produces humorous results.
Diary is a noun. It means a book full of blank pages that a person can use to record their thoughts and feelings on a daily, or weekly basis. It can also be a record of other daily events, like food eaten, symptoms felt over several days time.
Dairy is an adjective. It describes milk and milk-based foods like cheese and yogurt.
The following story uses both words correctly:
Daria was having lots of discomfort and suspected she had a dairy allergy. Her doctor suggested she keep a food diary for a week, recording what she ate and what symptoms she experience