• Resolved Vincenzo Casu

    (@vincent06)


    Hi, I want to point out in order to improve the accessibility of the plugin a bit, to insert the for attribute in the generation of labels for the various inputs. It takes very little and solves a big problem for those who are less fortunate.

    /***/

    foreach ($choices as $title => $iconSet) {

    $i++;

    /***/

    $icon = '<i class="fa ' . $iconSet['icon'] . '"></i>';

    $inner .= '<label for="kc_' . $i . '_input"><input id="kc_' . $i . '_input" type="radio" name="kc_captcha" value="' . $value . '" />' . $icon . '</label>';

    }

    /***/

    I hope this is something simple to add in the next update soon.

    I’m waiting for news.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Vincenzo Casu

    (@vincent06)

    Now that I think about it, even making a test with Lighthouse, maybe it would be even better to insert an aria-label attribute on the input field:

    /*****/
    $i = -1;

    foreach ( $choices as $title => $image ) {

    ++$i;

    if ( $i == $human ) {

    $value = 'kc_human';

    } else {

    $value = 'bot';

    }

    $output .= '<label><input aria-label="' . esc_attr__( 'Choice', 'contact-form-7-image-captcha' ) . ' ' . ( $i + 1 ) . '" type="radio" name="kc_captcha" value="' . $value . '" />' . $image . '</label>';

    }
    /*****/
    Plugin Author hookandhook

    (@hookandhook)

    Hi there,

    Thank you for your message.

    I am currently on holiday (October 4-18, 2024).

    I will have a look at this topic once I return.

    Plugin Author hookandhook

    (@hookandhook)

    Hi there,

    I have just released a new version which contains aria-labels for both form types (CF7 and WP Forms).

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.