Image copyright ITV Image caption John Middleton plays Ashley Thomas in Emmerdale

Emmerdale has been praised by fans and dementia charities for its portrayal of the illness in a special episode.

Tuesday's episode was shown from the perspective of long-running character Ashley Thomas, played by John Middleton, who is living with dementia.

Cathy Baldwin, organisational development manager at the Alzheimer's Society, described it as a "realistic portrayal" of the condition.

"I have no doubt it'll change people's perspective of dementia," she said.

Emmerdale producers have worked with both the Alzheimer's Society and MHA care homes to devise the storyline.

"When we were working on the story, the producers were very keen it was as true to life as it could be, which is quite difficult for a programme which is essentially a drama," Baldwin said.

"Emmerdale had been keen to make sure that it reached people and let people affected by dementia know that they weren't alone.

"I understand there has to be a certain element of dramatic licence, but Emmerdale have been so flexible about getting things like the language right, and last night I think they smashed it."

Image copyright ITV Image caption An average of 6.2 million viewers watched the special episode

Ashley Thomas, a former vicar, has stroke-related early onset vascular dementia and fans have watched his condition gradually worsen.

The one-off production saw changes to camerawork and editing to show things from Ashley's confused point of view as he left a hospital and made his way out alone.

Viewers saw him walking down the street in his pyjamas and struggling to count out change in shops.

Baldwin said she hoped it would help people who care for loved ones understand things better from their point of view.

She said: "The key thing for me was when people were going on Facebook last night and saying, 'I cared for my Mum or my gran or my partner, who had dementia, but for the first time now I understand what it might have been like for them.'"

The episode was watched by an average of 6.2 million viewers - slightly more than the ITV soap usually gets.

'Brave episode'

Viewers also took to Twitter to praise the soap. Andy Goulding said it was "brilliantly conceived, wonderfully produced and acted", adding: "A very brave and emotional episode."

Susan Love wrote: "Such a sad episode makes you think what all these people are going through. Well done in bringing this to the forefront."

Sue Myles tweeted: "Amazing acting, directing and scripts well done for raising awareness of dementia and well done John Middleton."

Ian MacLeod, Emmerdale's series producer, said: "People living with dementia face challenges most of us can barely imagine.

"So, I took it as a challenge to help people picture this experience - to put them inside the mind of someone living with this condition.

"With this chapter of Ashley's story, we set out to give people an insight into how ordinary, day-to-day experiences can become disorientating and distressing when refracted through the lens of dementia."

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.