Not sure to understand what you mean here, I think we need javascript to add product to basket action ajax call, it's not just about displaying a modal.