WordPress上的所有问题-Google灯塔无法在英雄部分的表单上检测到<label> </label>

我的客户的WordPress网站有问题,我无法修复,无法找到应该在表单上添加<label></label>的地方,这会触发Google Lighthouse上的a11y

WordPress上的所有问题-Google灯塔无法在英雄部分的表单上检测到<label> </label>

我对修补php和wordpress还是很陌生,我只能理解一点php,所以请多多包涵。这是hero.php上的

        <div class="hero-optin">
        <?php if ( ! empty( $hero['title'] ) || is_customize_preview() ) : ?>
            <h1 class="hero-title mb-small caps"><?php echo apply_filters( 'the_title',$hero['title'] ); ?></h1>
        <?php endif; ?>
        <?php if ( ! empty( $hero['description'] ) || is_customize_preview() ) : ?>
            <div class="hero-text mb-single">
                <?php echo wpautop( $hero['description'] ); ?>
            </div>
        <?php endif; ?>
        <?php md_email_form( array(
            'email_title' => false,'email_desc' => false,'email_input' => array( 'name' => true ),'email_submit_text' => ! empty( $hero['email_submit'] ) ? esc_html( $hero['email_submit'] ) : __( 'Join Now!','mb' ),'email_form_footer' => ! empty( $hero['email_footer'] ) ? esc_html( $hero['email_footer'] ) : ''
        ) ); ?>
        </div>

如何以及在何处添加<label></label>来解决此问题?

有人知道吗?

DtutuXsongshu 回答:WordPress上的所有问题-Google灯塔无法在英雄部分的表单上检测到<label> </label>

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2803430.html

大家都在问