International telephone element errors are not read by A/T

Created on 11 April 2024, 2 months ago

Problem/Motivation

When a form builder opts to use international telephone support in the telephone element, the resulting error container is not associated with the form input, so assistive tech users may not be notified that they have input errors.

Steps to reproduce

Add an international telephone input to a form.
Enter an invalid phone number.
Inspect the DOM - notice there is no aria-describedby relationship with the input.

Proposed resolution

Add an aria-describedby relationship to the input.

Remaining tasks

  1. Open a MR.
  2. Manually test with various screen readers.
  3. Merge
  4. Celebrate that we've made the internet a better place for everyone

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Luke.Leber Pennsylvania

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Luke.Leber
  • πŸ‡ΊπŸ‡ΈUnited States Luke.Leber Pennsylvania

    Fixed issue title...it's been quite a morning!

  • Status changed to Needs work 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Luke.Leber Pennsylvania

    I've opened a merge request, but I do think there may be deeper problems related to the international telephone input validation holistically including:

    1. There seems to be some repetition / contention between the error messaging added by the webform.element.telephone.js library and that which clientside validation adds.
    2. The reset method is called on keyup -- this can effectively clear validation messages for keyboard users before they have a chance to hear what the errors are.

    Leaving at Needs Work for the above points -- really need maintainer feedback, I think :-).

    Cheers!

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.2 & MySQL 8
    last update 2 months ago
    536 pass
  • Pipeline finished with Success
    2 months ago
    Total: 2141s
    #144145
Production build 0.69.0 2024