Search code examples
csswoocommercewoocommerce-theming

How to change required field asterisk color in WooCommerce


I would like to change the asterisk * required field's color in the woocommerce forms because it is generating a problem with the WAVE accessibility scan.

Is there a CSS code to use? Could somebody help me?


Solution

  • You could change asterisk * required field's color with css. Use the following selector to target it:

    .woocommerce form .form-row .required{
      color: #000 !important; /* Change "#000" to your preferred color */
    }
    

    Which outputs this:

    enter image description here