Rights groups and legal experts say the move could endanger minors, who are usually barred from witnessing executions.