Websites aiming to provide important services to its consumers have legal incentive to be designed to take various user disabilities into account. Because they could legitimately be fined or sued for failing to do so otherwise, websites representing businesses must adhere to guidelines that can assure that users with colorblindness, dyslexia, or an outright inability to see the world at all can still interact meaningfully with their content. This often takes the form of filling various tags with descriptive elements so that blind users can have images and other elements vocally recited by screen readers.
Despite what is sometimes seen as its relative lack of severity among impairments, colorblindness is an especially prevalent accessibility concern because it affects roughly 10% of all males. It typically makes certain pairs of colors far less distinguishable to some users even if others might find them to be incredibly self-evident. An especially problematic pairing of colors for a colorblind user to mix up would be red and green because those are the colors most often associated with indicating whether something is "correct" or "wrong." Websites commonly use these colors for form fields and buttons because they are decidedly useful for conveying relevant information and signals to the average user.
Even if a pair of buttons consists of differently labeled rectangles, if their shapes are filled uniformly with red or green colors, they could force colorblind users to have to stop to carefully read the text within each button to discern which one represents "cancel." Since the "cancel" button is usually considered "secondary" to a button like "send," it is helpful to both regular and colorblind users if it consists of a red-colored outline and red text over a blank background, even while the "send" button stays as white text over a green shape. In a similar method of "dressing up" elements that use red and green colors, when a web form uses those colors to indicate whether or not a given field is correctly filled out, having check marks and "X" symbols appear in those fields helps further clarify their status for all users. For more information click here https://baselinehq.com/blog/colourblindness-information-ui-design-red-green-problems-tips-tricks.html.