getByRole is preferred for interactive accessible elements because it reflects how assistive technologies understand the UI.
Question 4 of 20 in React Testing Quiz