我的客户的WordPress网站有问题,我无法修复,无法找到应该在表单上添加<label></label>
的地方,这会触发Google Lighthouse上的a11y
我对修补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>
来解决此问题?
有人知道吗?