I have been puzzling over where to put the submit button, on the left or the right. In researching, I noticed that many sites put buttons on the bottom right in dialogue boxes, and on the bottom left in forms.
It makes sense: in a dialogue box it seems to denote finality, being in the endpoint of the window for left–right readers; in a form, the bottom right could be in a different position relative to the rest of the form if the window is resized.
It seems to be a convention, but should the OK/Cancel buttons be aligned right or centered?
Should the OK/Cancel buttons be aligned right or centered?
In addition to what has been said, the alignment of OK/Cancel buttons in dialog boxes or forms can also depend on the specific design language or style guide being followed. For example, in Windows Forms, it is a common design practice to align OK button to the right and Cancel button to the left. However, in Mac OS, the standard is to align the default button (usually OK) to the left and the cancel button to the right.
Another consideration is access
Here are the relevant examples I could find:

- Google Drive “Add file” dialog: The OK button is aligned to the bottom right, and Cancel is centred.
- Visual Studio Code: The OK button is aligned to the right, the Cancel button is aligned to the left, and the Save and Cancel buttons are centred.
- Microsoft Word, Excel: The OK button is aligned to the right, Cancel is centred, Apply is the default