Yes, the save button should be disabled if there have been no changes made. It's best if the button's name emphasises the fact that it saves changes, e.g.: Save Chages and it's accompanied with a Cancel (or close) button, so the choice is obvious for the user.
- Are Disabled buttons bad for accessibility?
- Why is a Save button important?
- How do you make a button disabled in condition?
Are Disabled buttons bad for accessibility?
Bad accessibility
Sometimes disabled buttons are designed in a way that they cannot be read by a screen reader (buttons are not focusable, and hence users can't reach them with a keyboard). No need to explain that users with disabilities will face problems with such behavior.
Why is a Save button important?
Save buttons are common because of the common pattern learned by the users for decades. Load data or files from a persistent storage into main memory. Modify the data in main memory. Save the modified data back to a persistent storage.
How do you make a button disabled in condition?
To disable a button in JavaScript based on condition, utilize the “disabled” property with the “length” property, which will apply the functionality based on the length of input characters, or the “includes()” method with “document.