OPINION OF THE COURT
Pigott, J.We hold that harmless error analysis is applicable when a trial court has ordered the use of visible shackles without adequate justification articulated on the record (see Deck v Missouri, 544 US 622 [2005]). Here, defendant’s shackling during trial was harmless, as was an evidentiary error committed by *149the trial court. We also agree with the People that the count of defendant’s indictment charging him with attempted rape should not have been dismissed.
I
A female, civilian employee of Auburn Correctional Facility was attacked in the prison on the afternoon of July 7, 2006. She was walking along an otherwise empty corridor, towards the south mess hall kitchen when a man attacked her from behind, putting his hand over her mouth and nose. The employee, managing to get free of her attacker’s grasp momentarily, begged him not to hurt her, and asked, “What do you want?” The man did not answer. He slammed the woman against a wall, and thrust a sock or towel into her mouth. After she succeeded in getting the object out of her mouth, and screamed for help, the assailant threatened to kill her if she did not keep quiet, placed the same object into her mouth again, and pushed her onto her knees.
Remaining behind the employee at all times, so that she could not see him, the man pulled her head back by her hair, while continuing to push the sock or towel into her throat. He then pushed her to the floor. When the sock or towel fell out again, the man replaced it, shouted profanities, and punched the employee in the face. The assailant demanded her hands, and started wrapping a cord around one hand. The employee refused to yield her other arm, and bit one of the man’s hands, experiencing a sensation that made her think he was wearing gloves. The attacker, straddling the employee as she lay on her stomach, got both her hands behind her back.
It was at this point that another civilian employee of the prison, Anthony Rebich, who had heard his coworker’s cries, came to her rescue. He saw his colleague lying on the floor of the corridor struggling with an inmate who was trying to tie her hands with white strips of cloth. Rebich activated an alarm and yelled at the inmate who started running towards him. Rebich tripped the inmate, and the two men exchanged blows. Rebich chased the inmate along the corridor, but the inmate ran out of the building. Going to the aid of the female employee, Rebich and another colleague found her screaming for help and repeating that the man had tried to rape her.
Corrections Officer John Exner found defendant Raymond Clyde in the yard, in the vicinity of the south mess hall. He was sweating profusely, was acting nervously, and gave an *150explanation for his presence in the yard that made no sense to the officer. Rebich identified Clyde as the man he had encountered in the corridor. The female employee who had been attacked was unable to identify her assailant.
Clyde’s DNA was found on a sock, a towel, and a glove, left behind when the attacker fled the corridor. The DNA samples on the towel and glove came from semen-stained areas of those items. Semen was also found on the female victim’s T-shirt, but was insufficient for identification purposes. A tape roll and a strip of cloth left at the crime scene matched a tape roll spindle and a torn bed sheet found in Clyde’s single-occupancy cell.
The female employee had numerous facial lacerations, abrasions, and bruises, and a deep oral laceration. She told the nurse who treated her at the prison infirmary that an inmate had tried to rape her. She was treated at Auburn Memorial Hospital, and released. Rebich was treated at the same hospital, and was diagnosed with a concussion.
IL
Clyde was indicted on charges of attempted rape in the first degree, assault in the second degree (two counts), unlawful imprisonment in the first degree, and promoting prison contraband in the first degree. Defense counsel sought an order from County Court directing that Clyde be permitted to appear in court without prison garb, chains or shackles. The People, while not opposing this request, produced a report of Clyde’s criminal history, showing that he was serving a prison sentence of 25 to 50 years, following a 1996 conviction for rape in the first degree (two counts), sodomy in the first degree, robbery in the first degree, and burglary in the first degree. The People also pointed to Clyde’s earlier convictions and to a history of over 20 disciplinary findings during his present incarceration.
When Clyde’s trial began in December 2007, County Court agreed that Clyde could wear noninstitutional clothes and need not wear handcuffs, but insisted that he wear leg irons. The trial court offered to have a “curtain” draped around the defense table to conceal the leg irons. After some discussion with Clyde about the practical difficulties of such an arrangement, which would not allow Clyde to attend sidebar conferences without revealing the leg irons, Clyde agreed to forgo the curtain. At no point did County Court place on the record its findings showing that Clyde needed restraint by means of leg irons.
*151Clyde waived his right to counsel. Properly warned of the risks of self-representation, Clyde proceeded pro se throughout jury selection and his trial.* Clyde did not raise the subject of his shackles again, and sought no cautionary instruction in that regard.
In all, 29 witnesses testified at Clyde’s trial, including, among others, the female victim, Rebich, Exner, and the forensic scientists who had performed the DNA analysis. Sergeant Craig Diego testified that on the day before the attack, and twice on the morning of the attack, he had seen Clyde in a prison alleyway that he was not authorized to remain in, which was frequented by “teachers . . . go[ing] down to the [prison] school, [and] any civilians going down to the shops.” He had twice admonished Clyde, for being in the alleyway.
On cross-examination of the female victim, Clyde brought out that the assailant had not put his hands under her clothes, or touched her “private parts.” No evidence was presented to show that the assailant had disrobed.
In relation to the injuries suffered by Rebich, the prosecutor asked Dr. Mervyn Whelan, an emergency staff physician at Auburn Memorial, who had treated him, whether Rebich’s injuries met the definition of “physical injury,” namely “substantial pain or limitation of physical condition.” Clyde objected that this was a determination to be made by the jury. County Court overruled the objection, and Whelan testified that, in his opinion, Rebich had suffered a physical injury. Similarly, the prosecutor asked Dr. Barbara J. Connor, also an emergency staff physician at Auburn Memorial, who had treated the female employee, whether her injuries satisfied the same definition of “physical injury” and whether the attack had created a “risk of serious physical injury,” defined as physical injury that “creates a substantial risk of death.” Connor answered these questions in the affirmative, again over Clyde’s objection.
At the close of the People’s case, Clyde, who called no witnesses, moved for a trial order of dismissal. County Court reserved decision. The jury found Clyde guilty on all counts. County Court granted Clyde’s motion with respect to the charge of attempted first-degree rape, dismissing that count of the indictment, but denied the motion in all other respects.
*152Following his conviction, Clyde appealed, arguing that County Court had failed to articulate a reasonable basis on the record for its determination to restrain him in shackles during the trial. The People appealed County Court’s order dismissing the charge of attempted first-degree rape. The Appellate Division reversed County Court’s judgment of conviction, ruling that the use of shackles was reversible error, and further held that the trial court had properly dismissed the attempted rape charge (72 AD3d 1538 [2010]). One Justice dissented, and granted the People leave to appeal. We now reverse.
III.
In Deck v Missouri (544 US 622 [2005]), the United States Supreme Court, surveying law from Blackstone to the present day, held that the Federal Constitution prohibits the use of physical restraints visible to the jury during a criminal trial, absent a court determination that they are “justified by an essential state interest . . . specific to the defendant on trial” (id. at 624 [internal quotation marks omitted]). Such essential state interests include “physical security, escape prevention, [and] courtroom decorum” (id. at 628). The trial court must exercise “close judicial scrutiny” (Holbrook v Flynn, 475 US 560, 568 [1986], quoting Estelle v Williams, 425 US 501, 504 [1976]), in determining whether such an interest requires shackling.
The Court enunciated three fundamental legal principles that underlie this well-grounded holding: the presumption of innocence, securing a meaningful defense, and maintaining dignified proceedings (see Deck, 544 US at 630-632). The Court concluded that visible shackles may not be used unless justified by an individualized security determination conducted by the trial court, which “must be case specific; that is to say, it should reflect particular concerns, say, special security needs or escape risks, related to the defendant on trial” (id. at 633). The Supreme Court made it clear that, to avoid committing error, a trial court requiring a defendant to be visibly shackled should place its individualized findings on the record (see id. at 633-634; see also id. at 640-641, 643, 649 [Thomas and Scalia, JJ., dissenting]).
Finally, the Supreme Court clarified that
“where a court, without adequate justification, orders the defendant to wear shackles that will be *153seen by the jury, the defendant need not demonstrate actual prejudice to make out a due process violation. The State must prove ‘beyond a reasonable doubt that the [shackling] error complained of did not contribute to the verdict obtained’ ” (id. at 635, quoting Chapman v California, 386 US 18, 24 [1967]).
Here, County Court did not place on the record its reasons for considering leg irons necessary during Clyde’s trial. Clyde’s history would have supported a decision to require shackles, but the trial court has to make that determination and articulate its reasons itself. We cannot tell from the record whether County Court shackled Clyde as a matter of routine because he had already been convicted of a violent crime, or whether the court engaged in case-specific reasoning that led to the conclusion that shackles were necessary. The use of leg irons was therefore a violation of Clyde’s constitutional rights under Deck.
IV.
The issue then becomes whether the trial court’s error was harmless. Because we find that the trial court committed error as a matter of federal constitutional law, we apply Supreme Court precedent in deciding whether the error is of a type that may be harmless (see Chapman, 386 US at 20-21). In Deck, the Supreme Court declared that the burden is on the State to prove beyond a reasonable doubt that a shackling error “did not contribute to the verdict obtained” (544 US 622, 635 [internal quotation marks omitted], quoting Chapman, 386 US at 24). By quoting language from Chapman, a case that holds, as a matter of federal law, that federal “constitutional errors can be harmless” (Hedgpeth v Pulido, 555 US 57, 60 [2008]), the Deck Court made it clear that harmless error analysis applies to shackling errors.
Were we to decide this question under state constitutional law, the result would be the same. A defendant has the right to be free of visible shackles, unless there has been a case-specific, on-the-record finding of necessity. However, we would not hold, as a matter of state law, that an error in ordering shackles requires automatic reversal.
A constitutional error is “considered harmless when, in light of the totality of the evidence, there is no reasonable possibility that the error affected the jury’s verdict” (People v Douglas, 4 NY3d 777, 779 [2005]). We take into account “two discrete *154factors: (1) the quantum and nature of the evidence against defendant if the error is excised and (2) the causal effect the error may nevertheless have had on the jury” (People v Hamlin, 71 NY2d 750, 756 [1988]). We therefore must decide whether the proof of Clyde’s guilt was overwhelming and whether there is no reasonable possibility that the jury would have acquitted him were it not for the shackling error.
With respect to the charges of which Clyde was convicted after County Court granted his motion to dismiss with respect to the attempted rape charge, the evidence was overwhelming. In particular, DNA evidence and Rebich’s identification placed Clyde at the crime scene, and articles left behind by the perpetrator when he fled matched items in Clyde’s single-occupancy cell. Moreover, we do not believe that there is a reasonable possibility that the jury would have acquitted Clyde had he not worn visible shackles at trial. A jury, faced with a defendant accused of assaulting and/or attempting to rape a civilian while incarcerated, is more likely to conclude that the defendant was shackled as a precaution, because of the nature of the crimes charged, than to conclude that the defendant was shackled because he was independently known to be dangerous.
V
Clyde also argues on appeal, as he did pro se at his trial, that the testifying physicians were improperly allowed to testify as to their conclusions regarding the female victim’s and Rebich’s injuries, in the context of statutory interpretation, because those conclusions were for the jury to draw. Here, “admissibility turns on whether, given the nature of the subject, the facts cannot be stated or described to the jury in such a manner as to enable them to form an accurate judgment thereon” (People v Cronin, 60 NY2d 430, 432-433 [1983] [internal quotation marks omitted]). The facts that underlie physical injury and risk of serious physical injury can readily be stated to a jury so as to enable the jurors to form an accurate judgment concerning the elements of assault and unlawful imprisonment. It was therefore error to overrule Clyde’s objections and permit this expert testimony.
That said, nonconstitutional harmless error analysis applies to this error. The evidence that Clyde assaulted the female employee and Rebich, and unlawfully imprisoned the former, was overwhelming. Moreover, there is no significant probability that the jury’s verdict on these counts would have been different had *155it been required to draw its own conclusions with regard to the extent of the two victims’ injuries. Consequently, the evidentiary error was harmless.
VI
Finally, we turn to the question whether the evidence of attempted rape was sufficient. “A verdict is legally sufficient when, viewing the facts in a light most favorable to the People, there is a valid line of reasoning and permissible inferences from which a rational jury could have found the elements of the crime proved beyond a reasonable doubt” (People v Danielson, 9 NY3d 342, 349 [2007] [internal quotation marks omitted], quoting People v Acosta, 80 NY2d 665, 672 [1993]).
The jury heard evidence that, before the attack, Clyde was seen lurking in an alleyway that civilian employees often walked along; that he attacked a female victim in an otherwise empty corridor; that he brought items that could be used to silence and restrain a person; that he tried to incapacitate his victim; that he spoke to his victim but did not ask her to help him escape from the prison or direct her to do anything other than be quiet; and that he forced his victim to the floor. The jury also heard evidence from which it could infer that Clyde ejaculated before he fled the scene. A jury could logically conclude that the People sustained its burden of proving that Clyde intended to rape.
We also believe that the evidence was sufficient to show that Clyde “came dangerously near commission of the completed crime” (People v Kassebaum, 95 NY2d 611, 618 [2001] [internal quotation marks omitted]). The jury heard that testimony that Clyde had straddled his gagged victim, and was in the process of binding her hands, when he was disturbed by Rebich’s appearance in the corridor. A rational jury could have concluded that the attack was carried forward to a point that came within dangerous proximity to forcible sexual intercourse.
With respect to the attempted rape charge, therefore, Supreme Court erred in dismissing the count on sufficiency grounds. That was the only issue raised by the People’s appeal to the Appellate Division from County Court’s dismissal order, and it is the only issue we reach as to that count. Upon reversing the Appellate Division’s affirmance of County Court’s dismissal order, we remit the matter to County Court for sentencing on the conviction. Defendant then may take his own appeal to the Appellate Division, raising any issues available to him.
*156Accordingly, the order of the Appellate Division, reversing County Court’s judgment, should be reversed, and the case remitted to the Appellate Division for consideration of the facts and issues raised but not determined on the appeal to that court from the judgment. The order of the Appellate Division, affirming County Court’s order, should be reversed, and the case remitted to County Court for sentencing on the conviction of attempted rape in the first degree.
Clyde’s defense counsel was present in a standby capacity.