HARRISBURG, Pa. (AP) _ Pennsylvania public schools will have to teach about the deadly disease AIDS under regulations approved Thursday by a state commission.

The five-member Independent Regulatory Review Commission unanimously approved the rule requiring school districts to teach about acquired immune deficiency syndrome to all elementary, junior and senior high pupils.

Parents who object on religious or moral grounds will have the option of keeping their children out of the classes.

The rule specifies that courses in junior high and high schools must stress that sexual abstinence ''is the only completely reliable means of preventing sexual transmission of AIDS.'' Elementary school classes will not be required to discuss sexual transmission of AIDS.

''We're pleased with it,'' said Bernard Shire, spokesman for the Pennsylvania Catholic Conference, which pushed for the abstinence section. Private and parochial schools are not covered by the rule, but the state's Roman Catholic schools either have or are working on AIDS programs, Shire said.

State Rep. Stephen Freind, who played a key role in shaping the regulations, said the abstinence section was included for practical, rather than moral reasons. He said pushing safe sex can lull people into thinking they are 100 percent protected when they are not.

The Pennsylvania State Education Association, a teachers union, said it was concerned that courses could not be readied by the fall term but supported the idea of the classes.