• Resolved ksvgn2018

    (@ksvgn2018)


    When validating my site, I noticed an error that is related to Mailpoet plugin.

    Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

    This is from the source code (left the linebreaks in as they are also in the source code coming from the plugin). As you can see, your <style> element is nested inside a <div> which is not allowed. On this specific page I have an active Mailpoet newsletter widget.

    <div class="
        mailpoet_form_popup_overlay
          "></div>
      <div
        id="mailpoet_form_1"
        class="
          mailpoet_form
          mailpoet_form_widget
          mailpoet_form_position_
          mailpoet_form_animation_
        "
          >
        
        <style>
         .mailpoet_hp_email_label{display:none!important;}#mailpoet_form_1 .mailpoet_form {  }
    #mailpoet_form_1 .mailpoet_paragraph { line-height: 1.5; }
    #mailpoet_form_1 .mailpoet_segment_label, #mailpoet_form_1 .mailpoet_text_label, #mailpoet_form_1 .mailpoet_textarea_label, #mailpoet_form_1 .mailpoet_select_label, #mailpoet_form_1 .mailpoet_radio_label, #mailpoet_form_1 .mailpoet_checkbox_label, #mailpoet_form_1 .mailpoet_list_label, #mailpoet_form_1 .mailpoet_date_label { display: block; font-weight: 300; }
    #mailpoet_form_1
    
    [...]
    </style>
    • This topic was modified 2 years, 8 months ago by ksvgn2018.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ojoma a11n

    (@geraltrivia)

    Hello there @ksvgn2018

    Thank you for contacting us.

    This error has been reported to the devs but I can’t give you a specific ETA on when it will be fixed.

    A request has been created for it here: https://mailpoet.canny.io/feature-requests/p/remove-inline-styles-from-forms You can also add your vote.

    Thank you for your understanding.

    Have a great day!

    Thread Starter ksvgn2018

    (@ksvgn2018)

    Thank you for your reply. The request exists since Dec. 2020. As someone (and now me) pointed out in the comments on July 19, 2021, it’s not valid HTML. This seems to be a serious issue, your dev team should address this, it’s causing sites to be checked as invalid HTML.

    I will try to get it out of the source code with buffering and preg_match() but that will create unnecessary loading time and can only function as a workaround. Please make this a priority. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3 Validator throws error on this’ is closed to new replies.