Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility: Form fields for contact data have no label elements #4366

Open
adkurz opened this issue Mar 2, 2025 · 1 comment · May be fixed by #4368
Open

Accessibility: Form fields for contact data have no label elements #4366

adkurz opened this issue Mar 2, 2025 · 1 comment · May be fixed by #4368
Assignees
Labels
3. to review Waiting for reviews bug Something isn't working feature: contacts

Comments

@adkurz
Copy link

adkurz commented Mar 2, 2025

Describe the bug

Form fields for contact data, such as name or telephone number, have no label elements (). The labels are only contained in simple span elements. Therefore, it is not possible for screen readers and other assistive technologies to link a form field to its name, so the fields do not have an accessible name. This also applies to the read-only form fields in the view of a specific contact.

Steps to reproduce

  1. Add a new contact or edit an existing contact.
  2. View a field, e.g. “Name” or “City”.
  3. View the HTML code (developer tools in a browser)

Expected behavior

Any label text should be enclosed in a label element (name). To link a label with the associated form field, the for attribute should be used. The value of this attribute is the form fields ID. Example: For a form field with the id "city" (): City:

Actual behavior

There are no label elements, only span elements for the label texts.

Contact version

7.0.1

Operating system

Debian

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database

MariaDB

Additional info

No response

@SebastianKrupinski
Copy link
Contributor

Hi @adkurz

Thank you for bringing this to out attention.

I have made a quick patch, the might address this without converting the tags to labels.

Is there any chance you could test the patch with your accessibility software?

#4368

@SebastianKrupinski SebastianKrupinski added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage labels Mar 3, 2025
@SebastianKrupinski SebastianKrupinski self-assigned this Mar 3, 2025
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: contacts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants