getByRole is preferred for interactive accessible elements because it reflects how assistive technologies understand the UI.