A Perth teenager has been sentenced to more than six years in juvenile detention for breaking into an elderly woman's home and subjecting her to a "violent, degrading and humiliating" sex attack.

In the early morning of October 13 last year, the 15-year-old boy — who cannot be identified — used a brick to break a window at the 83-year-old woman's southern suburbs home, before climbing inside and "launching himself on to her" as she sat watching television.

WARNING: This story contains graphic details which may distress some readers.

State prosecutor Catherine Fletcher told the Perth Children's Court the teenager demanded money from the woman, but when she said she did not have any, he hit her on the head and ears and sexually assaulted her.

The teenager continued to attack the woman, who used a walking frame, dragging her by the hair to the bathroom and again repeatedly sexually assaulting her.

Ms Fletcher said the teen then turned on the shower and forced water on his victim's body and into her mouth, "causing her to feel as though she was drowning".

The teenager also threatened that if the woman went to the police, he would come back the next day with a knife, before hitting her with "karate chops" to the head.

The boy fled after stealing the woman's handbag.

He was arrested after his DNA was found on some of the woman's clothing.

Teen had 'borderline' intellectual functioning

The boy's lawyer, Tony Hagar, said his client had a history of robbery and burglary offences and had been released from detention only weeks before the attack.

The boy was taken into custody two days after the attack. ( ABC News: Emily Piesse )

An arrest warrant had been issued for him two days before the attack, because he was not complying with the terms of his release.

The teenager was also using amphetamines and had committed the burglary so he could get money to buy more drugs.

Mr Hagar accepted the offences were very serious, saying "no words" could make good what happened to the victim in what must have been "a terribly scary and frightful experience".

However, he described the teenager's life as "tragic", saying he had been neglected by his parents, and while there was no formal diagnosis of foetal alcohol syndrome, the teenager had "borderline intellectual functioning" and cognitive impairment.

Victim no longer able to sing

Children's Court president Judge Julie Wager accepted the teenager's life had been "a very, very hard one indeed," saying "a 15-year-old boy should not have to go through" what he had.

However, she described the offences as "terrible", saying the victim believed she was going to be killed.

"You violated her, threatened her and humiliated her. She was in her own house. She thought she was safe and secure … She is an old lady who should be able to feel safe," Judge Wager said.

Judge Wager said the woman, in her victim impact statement, said she had "never felt so helpless", and believed on that early morning the teenager could have killed someone half her age.

He also said the woman — who spent six weeks in hospital — now had panic attacks and a stutter that was not there before, and could no longer sing because her throat was burnt by the water.

The teenager wiped away tears as Judge Wager read aloud a letter he wrote to the court in which he said he was "sorry" for what he had done.

"I made a bad decision. I am ashamed of myself," the boy said.

"I regret, and I know it was bad, and I will not do any of it again."

Judge Wager took into account the teenager's pleas of guilty to the offences and his very young age in determining that a term of detention of six years and four months was the appropriate penalty.

The teenager will have to serve half of the sentence before he can be released.