This variation in pronunciation is NOT based on Africa or African-American Vernacular English. It is ANCIENT.
In Old English (1000-1500 years ago), in ENGLAND, both pronunciations (and spellings) were common: ascian (ask) and axian (aks). This variation extended to another verb with a similar sound pattern: tascian (task, "to require") and taxian (taks, "to require"). This variation has been common throughout the history of English. The two forms "task" and "tax" eventually became two separate verbs with slightly different, but clearly related, meanings. "Ask" and "aks" have not become separate verbs, probably because there is already a noun in English, "axe", that has a totally different meaning.
This is NOT a Black English thing, but is an ancient variation in (white) England.
I am a Linguistics professor at a major US university