According to Hernandez (2011)1:
Lexical errors are mistakes at the word level, which include, for example,
choosing the wrong word for the meaning the writer wants to express. Llach (2015)2 indicated that “when inappropriate lexical choices are made they can lead directly to misunderstanding of the message, or at least to an increase in the burden of interpreting the text” (p. 109)
While, grammatical error is defined as:
Grammatical error is a term used in prescriptive grammar to describe an instance of faulty, unconventional, or controversial usage, such as a misplaced modifier or an inappropriate verb tense (Garner, 2012)3. According to Hernandez (2011), grammatical errors involve faulty structures which may include wrong verbal tense, incorrect
verbal forms, and syntax problems. It is also called usage error. In this study, the following were identified as
grammatical errors: agreement errors (subject-verb agreement and noun-pronoun agreement), tense errors
(past/present, aspect, etc.), number (singular/plural) errors, prepositional errors, article errors, and conjunction errors.
Furthermore, a study was conducted on 'GRAMMATICAL AND LEXICAL ERRORS IN STUDENTS’ ENGLISH COMPOSITION'
Lexical errors due to homophone problems
(75) The march ended with our school winning so we were happy. (The match ended with our school winning so we were happy).
(77) As a student, I have the rite to use the school computer.... (As a student, I have the right to use the
Semantic lexical error
(90) When you come to my school the first thing you will meet is the Senior Housemaster’s Bungalow. (When you come to my school the first thing you will come across/see is the Senior Housemaster’s Bungalow).
(93) When we got to the school for the match we jumped from the vehicle. (When we got to the school for the match we got off the vehicle).
The answer: it depends
Grammatically the sentence does break numeric accord ('singularity/plurality'). You quoted:
When someone uses a wrong word through spelling, while intending to use another, it is a grammatical error
I would say the opposite and say the above is a lexical error, with emphasis on 'while intending to use another'. Simply because the person made a mistake, such as a typo but has the correct grammatical knowledge to amend it. Natives make typos all the time, simply because we type too fast or didn't read the message before clicking the send button. However, if the person continually confuses singularity and plurality accord 'a woman/women', then it would be crystal clear that it is a grammatical error.
1 Hernandez, M. S. (2011). Raising students awareness about grammatical and lexical errors via email. Revista de Lenguas Modernas, 4, 263-281
2 Llach, P. A. (2015). Lexical errors in writing at the end of primary and secondary education: Description and pedagogic implications. Porta Linguarum, 23, 109-124
3 Garner, B. A. (2012, September 27). Which language rules to flout. Or flaunt? The New York Times, New York.
4 AN: In this section, attention was placed on the semantic aspect (meaning) rather than on spelling. Some of these problems occurred because of homophone problems. In this analysis, the lexical errors were discussed under two categories: those errors caused by homophone problems and those caused by inappropriate or misuse of the word (semantic lexical errors).