The Harry Potter books are children’s literature. Not young adult. At least the first four or five are.
Notice how they’re almost all divided into very episodic chapters. That’s because children’s novels are generally built for reading maybe a chapter or two at a time. Maybe before bed or during reading time in a classroom.
Also those books are very much literature.