Skip to content

fix(design): combine host ARIA with input errors #602

Closed

Description

@uniqueg

Why

#523 forwards host ARIA attributes to the inner control of ecc-utils-design-input and -textarea. Since #576, both components also reference their own error message (aria-describedby="error") and set aria-invalid from the invalid and error properties. The two don't combine yet:

  • A host aria-describedby replaces the component's own error reference. Where the browser supports element references (ariaDescribedByElements), the built-in error message is then no longer announced.
  • A host aria-invalid="false" overrides the invalid state implied by invalid or a non-empty error.

What to do

  • Add the host's description references to the component's own error reference, so that both are announced.
  • Treat the control as invalid if either the host's aria-invalid or the invalid/error properties say so.
  • Add tests for both cases, in both components, and in the fallback path without element references.

Done when

  • With error set and a host aria-describedby, the inner control describes both.
  • With error set and a host aria-invalid="false", the inner control is invalid.
  • Tests and the docs (attribute forwarding section) cover both.

Activity

  1. added
    priority: low
    type: bug
    workload: hours
    status: triage
    on Nov 21, 2026
  2. salihudickson commented on Nov 21, 2026

    @salihudickson
    Contributor

    @uniqueg, #523 covers this. Please check it out.

  3. uniqueg commented on Nov 23, 2026

    @uniqueg
    MemberAuthor

    Thanks @salihudickson, confirmed: #523 (merged on 22 Nov) covers both points. attribute-forwarding.ts now adds the host's aria-describedby references to the component's own error reference instead of replacing it, and treats the host's aria-invalid and the invalid/error properties as additive. The tests "combines the consumer description with the built-in error reference" and "treats aria-invalid, invalid, and error as additive signals" in attribute-forwarding.test.ts cover both components, the fallback path has its own tests, and the input and textarea docs describe it. Closing as done.

  4. removed
    status: triage
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowtype: bugworkload: hours

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions