• Resolved thomasgk

    (@thomasgk)


    Hello,

    On acceptance field on Accessibility Checker i get error that input label does not have text.

    The problem seems to happen because on line 86 on modules/acceptance.php

            $html = sprintf(

                ‘<span class=”wpcf7-list-item”><label>%s</label></span>’,

                $html

            );
    label does not contain the “for ” attribute.

    Should be added or is left out for specific reason?

    • This topic was modified 2 years, 7 months ago by thomasgk.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter thomasgk

    (@thomasgk)

    on my site i have modified your code to include label “for” attribute that’s why i didnt provide the url. but my question is global. as you can see on your code i provide, label of acceptance does not have “for” attribute. and i was wondering if is on purpose like this.

    Thread Starter thomasgk

    (@thomasgk)

    if you need a website you can view this one for example
    https://nuntiusweb.gr/contact-us/

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    <label><input type="checkbox" name="acceptance" value="1" id="accept" aria-invalid="false" /><span class="wpcf7-list-item-label">Συμφωνώ ότι τα δεδομένα μου <a href="/privacy-policy/">συλλέγονται και αποθηκεύονται</a>.</span></label>

    If you are saying about this part, the for attribute is not necessary because the label text and its target field are both inside the <label></label>.

    Thread Starter thomasgk

    (@thomasgk)

    i guess you are right, i probably get false alarm from accessibility checker tool.

    Just for reference this tool https://websiteaccessibilitychecker.com/checker/index.php does not recognize recognize text if label does not have for attribute.

    i will mark this as solved, thank you for your time 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Acceptance Accessibility Issue’ is closed to new replies.