Style guides, API references etc. often indicate best practices regarding how these are meant to be used and, if you have a well-supported widget toolkit, a lot of these things even happen automatically. This is why a lot of apps are accidentally usable even if no #accessibility considerations were ever deliberately made.
The visual side of things is harder, but requires a similar early call on accessible color combinations when you're locking in your branding and design. This is where a lot of designers feel their style's being cramped because they're trying to make a Van Gogh painting rather than a usable UI. At the end of the day, a user interface is meant for the user to interface with the product, not for a user to ooh and ahh at the pwetty colors you stuck intheirface. Easy mistake to make, but now you know, alright?