Cockney is relatively easy compared to some other local UK dialects/accents. My wife's family is from Stirlingshire in Scotland and they say stuff like:
'yer wain's greetin' -> 'the baby's crying'.
'I'm away tae get woor messages' -> 'I'm going to the shops for food'
It took my a while before I could understand them :-)
In those examples, it's not just the accent or the words / language used, it's local expressions, sayings and the like. A perfectly simple and easily read sentence like "I need to see a man about a dog" can be pronounced in the most fluent and understandable accent (TV English), and still non-natives wouldn't realise it means you're going to the bathroom. In fact, going to the bathroom is another expression / figure of speech. You get the idea.
Words, grammar and pronunciation are just part of the story.
Accent and dialect are distinct. Maybe it's because I was born in Scotland, spent my teenage years in the English midlands and north, now live in London and watch TV from the states, but I've never met an English speaker whose accent I had difficulty understanding. And that includes all the heavily accented (although generally second-gen) immigrants I've met.
Dialect on the other hand means words I don't know the definition of, and sometimes there isn't enough context to intuit it.
Exactly. But it's obviously not just the accent thats at issue here. If you think about it, and try to do a good impersonation of someone talking in a different accent it has to include a bit of dialect and local grammatical idioms to make it convincing.
I assumed that the original comment about 'foreign accents' also encompassed the grammatical tics that foreign speakers often have. Someone speaking grammatically correct english in a strong accent is easily understood, but it only takes a very little grammatical mistake to change to meaning of a sentence. For example, an Italian colleague who missed out a 'to' and told me 'just a minute, I'll come over your desk' caused some admittedly slightly childish giggling in the office...
'yer wain's greetin' -> 'the baby's crying'.
'I'm away tae get woor messages' -> 'I'm going to the shops for food'
It took my a while before I could understand them :-)