Problem/Motivation

When a validation occurs on an element, the aria-describedby is replaced with the error message. This removes the original aria-describedby, which in some cases is needed for context or other helpful information. The WCAG standard supports multiple aria-describedby by adding them in sequence with a space delimiter, so this module should also allow this.

Steps to reproduce

Enable the module.
Cause a form error validation with a field that has help text.

Proposed resolution

Append the error message to the end of the existing aria-describedby attribute using a space delimiter.

Issue fork forma11y-3579807

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jfurnas created an issue. See original summary.

jfurnas’s picture

Issue summary: View changes

jfurnas’s picture

Title: Original aria-labeledby replaced with error message, instead of being added to it. » Original aria-describedby replaced with error message, instead of being added to it.
thomasfava’s picture

Nice fix!

thomasfava’s picture

Status: Active » Reviewed & tested by the community
thomasfava’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jfurnas’s picture

Status: Fixed » Closed (fixed)