Skip to content

WCAG 2.2 Compliance (solved) #25

@spanish

Description

@spanish

Hi,

I installed this plugin on a site that was getting a spam accounts creation attack and it stopped it completely.

Thanks!

\ ;-)

But WAVE gives me an error on form pages (see at the end).

I solved it by changing the following code in honeypot.pt:

CURRENT

  <input type="text" value=""
         tal:attributes="name view/honeypot_field_name" />

FIXED

  <input type="text" value=""
         tal:attributes="name view/honeypot_field_name;
                         id view/honeypot_field_name;
                         aria-label view/honeypot_field_name" />

And changing the following code in auto.py:

CURRENT

honeypot.attrib["name"] = config.HONEYPOT_FIELD

FIXED

honeypot.attrib["name"] = config.HONEYPOT_FIELD
honeypot.attrib["aria-label"] = config.HONEYPOT_FIELD

Hugs,

Manuel

PS: WAVE Error:

Missing form label

What It Means
A form control does not have a corresponding label.

Why It Matters
If a form control does not have a properly associated text label, the function or purpose of that form control may not be presented to screen reader users. Form labels also provide visible descriptions and larger clickable targets for form controls.

What To Do
If a text label for a form control is visible, use the element to associate it with its respective form control. If there is no visible label, either provide an associated label, add a descriptive title attribute to the form control, or reference the label(s) using aria-labelledby. Labels are not required for image, submit, reset, button, or hidden form controls.

The Algorithm... in English
An (except types of image, submit, reset, button, or hidden), , or <textarea> does not have a properly associated label. A properly associated label is: a non-hidden <label> element with a for attribute value that is equal to the id of a unique form control a <label> element that surrounds the form control, does not surround any other form controls, and does not reference another element with its for attribute a non-empty title attribute, or a non-empty aria-labelledby attribute Standards and Guidelines 1.1.1 Non-text Content (Level A) 1.3.1 Info and Relationships (Level A) 2.4.6 Headings and Labels (Level AA) 3.3.2 Labels or Instructions (Level A)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions