
777 A.2d 446 (2001)
R.M.
v.
Barbara S. BAXTER, Guardian Ad Litem for T.M., Huntingdon County Children's Services, M.E.M., Mother, N.M.M., Father, John and Jane Doe, Foster Parents.
Appeal of Barbara S. Baxter, Guardian Ad Litem for T.M. and Huntingdon County Children's Services.
Supreme Court of Pennsylvania.
Argued December 4, 2000.
Decided August 21, 2001.
*447 Barbara S. Baxter, Huntingdon, for guardian ad litem, Peter McManamon, Huntingdon, for Huntingdon County Child Services.
Robert Ferguson, Lewistown, for E.M., Elaine J. Novacco, Warriors Mark, for R.M.
Before FLAHERTY, C.J., and ZAPPALA, CAPPY, CASTILLE, NIGRO, NEWMAN and SAYLOR, JJ.

OPINION
ZAPPALA, Justice:
We granted allocatur to determine whether 23 Pa.C.S. § 5313 confers standing upon a grandparent to file a complaint for custody and/or visitation of a grandchild after the child has been adjudicated dependent. The trial court held that a grandparent lacks standing under these *448 circumstances and dismissed the complaint. The Superior Court reversed and remanded, holding that the statute confers automatic standing upon a grandparent to seek physical and legal custody of a grandchild. For the reasons that follow, we affirm.
T.M. was born on March 9, 1996. The child resided with his biological parents from the date of his birth until June 26, 1996, when he was seriously injured as a result of shaken baby syndrome. While T.M. was hospitalized, Huntingdon County Children's Services (the Agency) obtained an emergency protective order to prevent T.M. from being returned to his parents' home. T.M.'s mother subsequently pled guilty to the offense of endangering the welfare of a child. With the consent of his parents, T.M. was declared to be a dependent child and was placed in the legal custody of the Agency on July 16, 1996. T.M. was subsequently placed with foster parents. The goal in the dependency action is adoption.[1]
On September 2, 1997, T.M.'s paternal grandmother, R.M. (Grandmother), filed a Complaint for Custody or Partial Custody and/or Visitation.[2] Therein, she alleged that she has genuine care and concern for her grandson and that it was in his best interests to be in her care and custody. Grandmother asserted that her relationship with T.M. began with the consent of both of his parents and that she has continuously visited him when she was permitted to do so. She further asserted that she deems it necessary to assume responsibility for T.M. due to his mother's criminal conviction for endangering his welfare.
T.M.'s guardian ad litem and the Agency (hereinafter Appellants)[3] filed preliminary objections to the complaint. They contended that Grandmother failed to satisfy the standing requirements of Section 5313, which provides as follows
§ 5313. When grandparents may petition.
(a) Partial custody and visitation.If an unmarried child has resided with his grandparents or great-grandparents for a period of 12 months or more and is subsequently removed from the home by his parents, the grandparents or great-grandparents may petition the court for an order granting them reasonable partial custody or visitation rights, or both, to the child. The court shall grant the petition if it finds that visitation rights would be in the best interest of the child and would not interfere with the parent-child relationship.
(b) Physical and legal custody.A grandparent has standing to bring a petition for physical and legal custody of a grandchild. If it is in the best interest of the child not to be in the custody of either parent and if it is in the best interest of the child to be in the custody *449 of the grandparent, the court may award physical and legal custody to the grandparent. This subsection applies to a grandparent
(1) who has genuine care and concern for the child;
(2) whose relationship with the child began with the consent of a parent of the child or pursuant to an order of court; and
(3) who for 12 months has assumed the role and responsibilities of the child's parent, providing for the physical, emotional and social needs of the child, or who assumes the responsibility for a child who has been determined to be a dependent child pursuant to 42 Pa.C.S. Ch. 63 (relating to juvenile matters) or who assumes or deems it necessary to assume responsibility for a child who is substantially at risk due to parental abuse, neglect, drug or alcohol abuse or mental illness. The court may issue a temporary order pursuant to this section.
23 Pa.C.S. § 5313 (emphasis added).
The trial court sustained Appellants' preliminary objections and dismissed Grandmother's complaint. It held that subsection (a) of Section 5313 did not confer standing because T.M. never resided with Grandmother. It found that Grandmother met the criteria of subsections (b)(1) and (b)(2) because she pled that she had genuine care and concern for the child and that her relationship began with the consent of the child's parents. It held, however, that Grandmother failed to plead the existence of one of the three sets of circumstances conferring standing in subsection (b)(3). Specifically, the court held that T.M. was not "substantially at risk due to parental abuse" because he had already been declared dependent and was outside of the abusive parental home.
The Superior Court reversed and remanded. R.M. v. Baxter, 725 A.2d 775 (Pa.Super.1999). It agreed that subsection (a) did not apply and that Grandmother satisfied the requirements of subsections (b)(1) and (b)(2). The court held, however, that the fact that T.M. had been declared dependent did not prevent Grandmother from satisfying the language in subsection (b)(3) regarding T.M. being "substantially at risk due to parental abuse." The court reasoned that otherwise, anytime an agency sought dependent status for a child, a grandparent's ability to seek custody of his grandchild would be negated. The court concluded that such result would be in clear opposition to the mandate of the statute, which unequivocally states that a "grandparent has standing to bring a petition for physical and legal custody of a grandchild." Id. at 779.
In ruling on whether preliminary objections should have been granted, an appellate court must determine whether it is clear from doubt from all the facts pleaded that the pleader will be unable to prove facts legally sufficient to establish a right to relief. Pennsylvania AFL-CIO v. Commonwealth of Pennsylvania, 563 Pa. 108, 757 A.2d 917 (2000). Here, the facts are undisputed. The issue of whether the statute confers standing upon a grandparent to seek custody and/or visitation is purely one of law, over which our review is plenary. Phillips v. A-Best Products Co., 542 Pa. 124, 665 A.2d 1167 (1995).
Initially, we note that prior to the 1996 enactment of Section 5313(b), a grandparent had no right to seek visitation or partial custody of a grandchild unless a parent was deceased, 23 Pa.C.S. § 5311, the parents' marriage was dissolved or the parents separated, id. at § 5312, or the child had resided with the grandparent for 12 months or more and was subsequently removed from the home by his parents, id. *450 at § 5313. See also Herron v. Seizak, 321 Pa.Super. 466, 468 A.2d 803 (1983) (grandparents have no right to visit child where neither parent was deceased, parents' marriage was not dissolved, and child had not resided with grandparent for 12 months or more).
The 1996 amendment changed the heading title of Section 5313 (from "When child has resided with grandparents" to "When grandparents may petition"), designated the former text as subsection (a) and added the text set forth in subsection (b). The new subsection (b) recognized a grandparent's claim for "physical and legal custody" of a grandchild, rather than the previous reference to "partial custody and visitation." Thus, the 1996 legislation expanded grandparents' rights and specifically addressed the issue of grandparent standing in a custody matter.
In previous case law discussing third-party suits for visitation or partial custody, a stringent test for standing arose out of a respect for the traditionally strong right of parents to raise their children as they see fit. Ken R. v. Arthur Z., 438 Pa.Super. 114, 651 A.2d 1119 (1994). The courts generally found standing in third-party visitation and custody cases only where the legislature had specifically authorized the cause of action. Id. We must determine whether section 5313 serves as such authority in this case.
Appellants argue that the legislature did not authorize Grandmother to petition for visitation and/or custody at any time after T.M. was adjudicated dependent. They assert that standing could not arise from 23 Pa.C.S. § § 5311 and 5312 because Grandmother's son, T.M.'s father, was not deceased, nor did T.M.'s parents separate or divorce. They also assert that Section 5313(a) does not confer standing because T.M. never resided with Grandmother. These conclusions are undisputed.
The crux of the argument lies with Section 5313(b). Contrary to the holding of the Superior Court, Appellants contend that this section does not give all grandparents automatic standing, but instead only confers standing to those grandparents who satisfy the specific requirements stated therein. According to Appellants, there are three requirements to afford a grandparent standing to petition for physical and/or legal custody of his/her grandchild: (1) the grandparent has genuine care and concern for the child; (2) the relationship began with the consent of a parent or pursuant to a court order; and (3) any one of the following: (I) the grandparent has in loco parentis status; (ii) the grandparent assumes responsibility for a grandchild who has been adjudicated a dependent child under 42 Pa.C.S. Ch. 63; or (iii) the grandparent assumes or deems it necessary to assume responsibility for a grandchild who is substantially at risk because of parental abuse, neglect, drug or alcohol abuse or mental illness.
Thus, Appellants view the circumstances set forth in subsection (b) as setting forth conditions that must be satisfied before a grandparent has standing to pursue his/ her custody claim. Specifically, as they argued before the lower courts, Appellants contend that the third scenario in subsection (b)(3) has not been met because T.M. is not a child "who is substantially at risk" because he had been adjudicated dependent at the time the complaint for custody was filed. They maintain that for Grandmother to have standing under the circumstances of this case, she would have had to petition for custody prior to the Agency's involvement in the case and prior to the adjudication of T.M. as a dependent child.
To the contrary, Grandmother contends that Section 5313(b) confers automatic standing upon a grandparent to file for custody of her grandchild simply by virtue *451 of the familial relationship. She asserts that the new legislation was added to address the increasing need for grandparents to obtain physical and legal custody of grandchildren they perceive are at risk due to parental abuse or neglect, whether due to alcohol abuse, drug abuse or mental illness. Grandmother maintains that Section 5313(b) permits a grandparent who is aware of such a situation to petition the court for temporary physical or legal custody until such time as his/her child or partner obtains the counseling they require and the grandchild is no longer at risk. She asserts that, unfortunately, she did not become aware of the parental abuse until after the Agency became involved. Grandmother maintains that she utilized the new legislation in an attempt to obtain temporary custody of her grandson after his mother had pled guilty to the criminal offense of endangering his welfare.
We find that Grandmother's interpretation of the statute is more consistent with the plain text of the provision. The unqualified language of the statute states, "A grandparent has standing to bring a petition for physical and legal custody of a grandchild." This clear and unambiguous pronouncement cannot be ignored or modified by the subsequent reference to whom the provision, as a whole, is intended to apply. It is well settled that words and phrases contained in a statute shall be construed according to rules of grammar and according to their common and approved usage. Commonwealth v. Burnsworth, 543 Pa. 18, 669 A.2d 883 (1995); 1 Pa.C.S. § 1903(a). When the words of a statute are clear and free from ambiguity, the letter of it is not to be disregarded under the pretext of pursuing its spirit. Id. at § 1921(b). The language providing that, "This subsection applies to a grandparent who ...," refers to the requirements a grandparent must establish to prevail on the merits of the custody claim. This is evidenced by the fact that "this subsection" is entitled, "Physical and legal custody," rather than "Standing."
As cogently stated by the Superior Court,
[t]he circumstances set forth in subsections (1), (2) and (3) are questions of fact to be resolved by the trial court after a hearing held to determine "[I]f it is in the best interests of the child not to be in the custody of either parent and if it is in the best interests of the child to be in the custody of the grandparent...." 23 Pa.C.S. § 5313(b).
725 A.2d at 778. Here, however, Grandmother was never given the opportunity to prove her claim on the merits because the trial court sustained Appellant's preliminary objections and dismissed Grandmother's claim based on lack of standing.[4]
Accordingly, we affirm the order of the Superior Court, reversing the trial court's dismissal of the custody complaint, and remand to the trial court for further proceedings consistent with this opinion.
Mr. Justice SAYLOR files a dissenting opinion in which Mr. Justice CASTILLE joins.
SAYLOR, Justice, dissenting:
As the majority emphasizes, Section 5313(b) of the Domestic Relations Code *452 provides that "[a] grandparent has standing to bring a petition for physical and legal custody of a grandchild." 23 Pa.C.S. 5313(b). Immediately following this conferral of standing, the General Assembly set forth the substantive standard that must be satisfied in order for custody to be obtained: "If it is in the best interest of the child not to be in the custody of either parent and if it is in the best interest of the child to be in the custody of the grandparent, the court may award physical and legal custody to the grandparent." Id. In the same subsection, however, the General Assembly expressly qualified both the conferral of standing and the ability to invoke the substantive standard for obtaining custody as follows: "This subsection applies to a grandparent" who meets three specific threshold criteria (genuine care and concern; existing relationship pursuant to parental consent or court order; and 12 months in the role of a parent, or assumption of responsibility for a child deemed dependent or in danger). Id. The understanding that the legislative qualification serves as a limitation upon standing is supported by the heading of Section 5313, "When grandparents may petition," id. 23 Pa.C.S. § 5313; see also 1 Pa.C.S. § 1924 (prescribing that headings may be considered as aids in the construction of a statute); and by the application of the precept that courts are to give effect to all of the provisions of a statute, see 1 Pa.C.S. § 1922(a).
To the extent that there is any ambiguity, further support for the above can be found in the legislative history of Section 5313. Initial versions of legislation contained fewer restrictions on a grandparent's right to seek custody than Section 5313(b).[1] Various legislators, however, expressed concern that such proposals failed to impose adequate limitations upon interference by grandparents in a parent's right to control his or her child's upbringing. One Senator observed that the legislation:
establishes bases upon which grandparents could initiate custody litigation seeking custody of their grandchildren over and against the children's parents under certain circumstances. I just want to note my concern that the potential is for litigation which will be too broad in nature. The bill, I think needs some further limiting and I am confident there will be further consideration of it in the House.
Statement of the Honorable David W. Heckler, Pa. Legis. JournalSenate, p. 544 (May 23, 1995). A Representative stated:
We would not want grandparents disrupting or invading the privacy and home life of their children seeking custody of their grandchildren if in fact it was not absolutely necessary. The words "over an extended period of time" [indicate that] where a debilitating instance exists with the natural parents [it] might be appropriate to give them standing in court.

Statement of the Honorable Kevin Blaum, Pa. Legis. JournalHouse, p.2033 (June 28, 1996) (emphasis added). These comments are clearly phrased in terms of imposing restrictions upon which grandparents *453 may seek custody, as opposed to which grandparents may ultimately obtain custody; they plainly reflect the concern of at least two legislators that third-party challenges to parental rights should be closely regulated. The additional restrictions that were ultimately included in the final enactment as signed into law further support the conclusion that the General Assembly sought to carefully limit the situations in which a petition could be filed by grandparents.
The legislative history of the statute dovetails with the well-settled restrictions upon standing in the child custody arena. See J.A.L. v. E.P.H., 453 Pa.Super. 78, 86-87, 682 A.2d 1314, 1318-19 (1996)(explaining that, in matters regarding child custody, standing requirements are designed not only to assure that actions are litigated by appropriate parties, but also to prevent interference with parental rights by outsiders). Both reinforce a restrictive conception of the circumstances in which parents will be haled into court to defend custody of their children. Both provide additional support for the conclusion that Section 5313, on its face, evidences a clear intention of the Legislature to balance the need to protect the right of parents to raise their children with a desire to afford grandparents a statutory basis upon which to seek custody in limited situations in which children are in special need and/or the grandparents have firmly established themselves in the role of primary caregiver.[2]
The majority's conclusion that Section 5313 confers a general right of standing upon all grandparents, regardless of whether they satisfy any of the criteria of Section 5313(b), subjects parents to legal proceedings seeking to deprive them of custody of their children despite having done nothing to suggest that they are unfit. Although such an effort by grandparents who do not meet the statutory criteria must ultimately fail, according to such a construction, parents must nonetheless endure a full-blown custody proceeding. See Majority Op. at 451 ("the circumstances set forth in subsections (1), (2) and (3) are questions of fact to be resolved by the trial court after a hearing held to determine `[i]f it is in the best interests of the child not to be in the custody of either parent and if it is in the best interests of the child to be in the custody of the grandparent'" (citations omitted)). I find such a result inimical to the Legislature's intent as conveyed by its choice of words and to application of principles of statutory construction.
It may be unfortunate (at least in some circumstances) that, in fashioning Section 5313(b), the General Assembly has not distinguished between situations in which a grandparent's custody petition would challenge custody reposited in biological parents from those in which the state has undertaken the parental role. While the majority's decision ameliorates the effects of any imprecision in legislative drafting as applied to the circumstances of this case, I would leave it to the General Assembly to make appropriate adjustments where it has evinced its intent to regulate challenges to custody by third parties, and the *454 guiding policy considerations are at least mixed. In such circumstances, it is my view that the legislative branch represents the superior forum in which to perform the necessary balancing of relevant concerns.[3]
The remaining question is whether Grandmother can satisfy the statutory requirement that she is seeking to assume responsibility for a child who is "at risk." See 23 Pa.C.S. § 5313(b)(3). Again, I believe that the plain language of the statute should control. Pursuant to the requirements of Section 5313(b)(3), a child who has been removed from a dangerous environment, placed in a secure situation, and whose parents' rights have been terminated, cannot be considered at risk from parental abuse or neglect. Again, there may be a legitimate concern in the circumstances of the case regarding the best interests of the child as it relates to the environment established by a Children's Services placement versus the grandparents' claim to a superior bond based upon the familial relationship. Again, however, in terms of the conferral of third-party standing to challenge an established and ongoing caregiver relationship, I believe that the General Assembly is best suited to balance the salient policies and provide the necessary direction.
In this case, T.M. was no longer at risk at the time Grandmother sought custody; he had been living for well over a year with a stable foster family who wished to adopt him. I would therefore conclude that Grandmother lacks the requisite standing, as she has failed to allege facts sufficient to satisfy the requirements to seek custody of T.M. pursuant to Section 5313(b)(3). Hence this dissent.
CASTILLE, Justice, joins this dissenting opinion.
NOTES
[1]  The Agency and T.M.'s guardian assert in their brief that T.M.'s mother executed a consent for adoption on November 24, 1997, and that the trial court confirmed the consent and terminated mother's parental rights on January 30, 1998. Appellee's Brief at 6. They further submit that T.M.'s father executed a consent for adoption and that the trial court confirmed the consent and terminated father's parental rights on August 19, 1998. Id. at 6-7. As these matters are not of record, they will not be considered by our Court in resolution of this appeal.
[2]  Grandmother has been afforded the opportunity to visit her grandson since the adjudication of dependency. Trial court opinion at 3. It is unclear from the record, however, whether the court directed such visitation or whether the parties merely agreed to allow the same.
[3]  T.M.'s biological parents and foster parents are also named appellants, although they have not participated in this appeal.
[4]  It must be recognized, however, that the legislature's conferral of automatic standing to seek the physical and legal custody of a grandchild does not affect a grandparent's evidentiary burden to prove his/her custody claim on the merits. It merely eliminates the preliminary standing requirement that a party establish a direct and substantial interest in the custody proceeding before the court.
[1]  For example, Section 5313(b)(3), as originally passed by the Senate, granted the right to seek custody to a grandparent:

(3) who has assumed the role and responsibilities of the child's parent, providing for the physical, emotional and social needs of the child, or who deems it is necessary to assume the role and responsibilities of the child's parent due to physical or sexual abuse or neglect, or parental dysfunction, such as drug or alcohol abuse or emotional or mental illness or instability.
Senate Bill 434 of 1995 (Printer's No. 453).
[2]  It is questionable whether a statute granting to grandparents a general right to seek custody of their grandchildren would survive constitutional challenge. In Troxel v. Granville, 530 U.S. 57, 120 S.Ct. 2054, 147 L.Ed.2d 49 (2000), a plurality of the United States Supreme Court invalidated a Washington statute granting a general right to petition for visitation regardless of the parents' fitness, finding the sweeping breadth of the law violative of a parent's fundamental right to care, custody, and control of his children as guaranteed by the Due Process Clause of the United States Constitution. See id. at 75, 120 S.Ct. at 2066.
[3]  This would also avoid the creation of controlling authority elevating the substantive terms of a statute ("A grandparent has standing to bring a petition for physical and legal custody of a grandchild") over express qualifying provisions ("This section applies to a grandparent who...."). I strongly disfavor this sort of precedent, as I believe that its application to other instances of legislative drafting is bound to yield idiosyncratic results; further, I believe that it complicates the already difficult task of legislative drafting.
