Kay Mellor’s mother was doing the washing-up when she dropped the bombshell that she’d had an affair.

“She told me she’d had a relationship with a Polish man before I was born,” says Kay. “The affair ended when her married lover was killed. She’d kept this secret for 30 years. It was extraordinary to hear her say she still loved this man. She said, ‘You won’t tell anyone about this, will you?’”

A decade later, Kay’s play, A Passionate Woman, was staged at the West Yorkshire Playhouse. The play, about a middle-aged woman looking back on a tragic affair, was based on her mother’s revelations.

“She saw it four times before she realised it was her story!” smiles Kay. “She kept telling people, ‘that’s me, you know’.”

Now, A Passionate Woman has been made into a TV drama, written and co-directed by Kay. Starring Sue Johnston and Billie Piper, it has been filmed in Bradford city centre, St Luke’s Hospital, Bradford, and King’s Hall, Ilkley.

Leeds-born screenwriter Kay is no stranger to Bradford locations. One of her most memorable TV dramas, Band Of Gold, about prostitutes in Bradford, was filmed in the city. Playing The Field, about a women’s football team, was partly shot at Bradford City FC, and family drama The Chase was filmed in Otley.

“Bradford still has great vistas and the old cobbled streets we wanted for A Passionate Woman, which is essentially a period drama,” says Kay. “St Luke’s Hospital and the Ilkley Winter Gardens were the kind of buildings we wanted.

“Filming in Leeds was more challenging because the views have changed drastically, with lots of modern structures. Finding locations for the 1950s was particularly hard.”

The drama begins in 1985 when Betty Stephenson, played by Sue Johnston, hides in her attic on her son’s wedding day, reflecting on her past. The action flashes back to the 1950s when the younger Betty (Billie Piper), embarks on an affair with a charismatic Polish neighbour.

“Years after Mum told me about her affair, my younger brother was getting married. There was the same pain on her face,” said Kay. “I knew these two periods of her life were intrinsically linked. She had an amazing connection with my brother and was heartbroken that he was getting married. She felt she had nothing to live for.

“My parents divorced when I was young, when I asked Mum why she married my dad, she’d say, ‘because he was a good dancer.’ That was how she was, she never mentioned love. Yet here she was, on her son’s wedding day, with this affair still haunting her. I felt compelled to write about it.”

Kay’s play transferred to the West End and New York, attracting the attention of film companies.

“Nobody would guarantee it wouldn’t be written by anyone else. It was so personal to me – can you imagine if someone else took it on?” says Kay.

“It was very important that it was set in Yorkshire. I feared it would become Cher on a rooftop in Detroit. I’m sure Cher is fabulous, but she’s not Betty. No amount of money would make me change my mind.

“Now it’s the project I want it to be. Three years ago, Mum died. Revisiting this is like having her back.”

I meet Kay on the set of A Passionate Woman. She points out a rooftop where Betty sits, contemplating her life. “Sue Johnston had to sit there for days. It was uncanny how much she became like my mum – she had the same mannerisms and way of speaking.

“Huge elements of the drama are taken from real life; the scene where Betty is washing up and talks about her affair is almost word-for-word what Mum told me.”

Billie Piper wasn’t Kay’s first choice for the young Betty, but the former Doctor Who star’s persistence paid off.

“She got hold of the script and was desperate for the part. She came to Leeds and said she’d go dark for the role, and have dialect coaching. Initially there was resistance from me because she’s not a Northerner, but her audition blew me away.”

Kay shows me tenement rooms built on the set, designed by Skipton art designer Grant Montgomery.

“He’s done a fantastic job,” says Kay. “This is where Betty lives and meets Craze, the Polish man living downstairs. I lived in a tenement like this as a baby. Mum said condensation ran down the walls through holes in the ceiling. Life was about keeping warm and dry.”

The drama – to be broadcast next year on BBC1, followed by an international cinema release – has a largely Bradford cast, including Andrew Lee Potts, John Duttine, Anthony Lewis and Rachel Leskovac.

Regional film agency Screen Yorkshire invested £250,000 and found local crew and locations.

“What Screen Yorkshire is doing is wonderful,” says Kay. “This region is my first port of call. I don’t see the point of going to London, I’m not inspired by anything there other than the theatre.

“My inspiration comes from family, friends, just listening to people.

“These are scary times for this industry – you only have to look at what’s happened at Yorkshire Television to see that. All I can do is try and keep making dramas here.”