Skip to content

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

Description

@adkurz

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions