WebAIM - Web Accessibility In Mind

E-mail List Archives

Programmatic relationship between form controls and labels

for

From: Steve Green
Date: Nov 5, 2024 3:50AM


WCAG SC 1.3.1 requires that there is a programmatic relationship between form controls and their labels. I am testing a website where there appears to be no such relationship, yet it doesn't seem right to report a non-conformance. I welcome your thoughts on this. For the purpose of this discussion, I am only interested in WCAG conformance, not the user experience.

There are three relevant elements:
1. An h2 heading containing the word "Search".
2. A label element containing the word "Search". This is hidden visually, using the "clip" technique.
3. A textbox that is programmatically associated with the hidden label element, so it has an accessible name.

I can only see two interpretations, each of which results in a non-conformance.
1. The h2 heading is considered to be the visible label for the textbox. They are not programmatically related, so there is a non-conformance of SC 1.3.1.
2. The h2 heading is not considered to be the visible label for the textbox. In this case, there is no visible label, which is a non-conformance of SC 3.3.2 (Labels of Instructions).

Is there a third interpretation that does not result in any non-conformances?

Regards,
Steve Green
Managing Director
Test Partners Ltd
020 3002 4176 (direct)
0800 612 2780 (switchboard)
07957 246 276 (mobile)
020 7692 5517 (fax)
Skype: testpartners
<EMAIL REMOVED>
www.testpartners.co.uk
 
Connect to me on LinkedIn - http://uk.linkedin.com/in/stevegreen2