Skip to content

fix(a11y): accept autocomplete prop on NumberInput, ChipInput, and Combobox#3425

Merged
bilal-karim merged 1 commit into
mainfrom
a11y/input-autocomplete-props
May 29, 2026
Merged

fix(a11y): accept autocomplete prop on NumberInput, ChipInput, and Combobox#3425
bilal-karim merged 1 commit into
mainfrom
a11y/input-autocomplete-props

Conversation

@bilal-karim
Copy link
Copy Markdown
Member

@bilal-karim bilal-karim commented May 21, 2026

Summary

  • Adds an autocomplete prop to NumberInput, ChipInput, and Combobox primitives, matching the existing pattern on Input
  • All three previously hardcoded autocomplete="off", preventing consumers from passing WCAG-defined purpose tokens like cc-number, email, or country-name (SC 1.3.5 Identify Input Purpose)
  • Default remains "off" — no existing consumer behavior changes
  • Uses FullAutoFill type from svelte/elements for type safety, consistent with Input

Test plan

  • Confirm existing consumers render identically (no behavior change with default "off")
  • Verify a consumer can pass autocomplete="email" to ChipInput and the DOM attribute is present
  • Verify a consumer can pass autocomplete="cc-number" to NumberInput and the DOM attribute is present
  • Verify a consumer can pass autocomplete="country-name" to Combobox and the DOM attribute is present

🤖 Generated with Claude Code

A11y-Audit-Ref: 1.3.5-input-autocomplete-props-batch

Allows consumers to pass WCAG-defined autocomplete tokens (e.g.
"cc-number", "email") to these input primitives. All three previously
hardcoded autocomplete="off", preventing purpose identification per
WCAG 2.2 SC 1.3.5. Default remains "off" so existing behavior is
unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bilal-karim bilal-karim requested a review from a team as a code owner May 21, 2026 19:55
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment May 21, 2026 7:55pm

Request Review

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd Bot commented May 21, 2026

Warnings
⚠️

📊 Strict Mode: 14 errors in 3 files (1.5% of 914 total)

src/lib/holocene/combobox/combobox.svelte (10)
  • L152:4: Type 'null' is not assignable to type 'string'.
  • L155:4: Type 'null' is not assignable to type '"search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | "arrow-down" | "arrow-left" | "arrow-up" | "arrow-right" | "ascending" | ... 140 more ... | "xmark-square"'.
  • L157:4: Type 'null' is not assignable to type 'keyof T'.
  • L241:4: 'inputElement' is possibly 'null'.
  • L242:4: 'inputElement' is possibly 'null'.
  • L248:14: Argument of type 'string | T | undefined' is not assignable to parameter of type 'string | T'.
  • L253:14: Argument of type 'string | T | undefined' is not assignable to parameter of type 'string | T'.
  • L297:60: Function lacks ending return statement and return type does not include 'undefined'.
  • L390:10: Type 'HTMLLIElement | null' is not assignable to type 'HTMLLIElement'.
  • L390:43: 'menuElement' is possibly 'null'.
src/lib/holocene/input/number-input.svelte (3)
  • L9:13: Type 'null' is not assignable to type '"search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | "arrow-down" | "arrow-left" | "arrow-up" | "arrow-right" | "ascending" | ... 140 more ... | "xmark-square"'.
  • L20:13: Type 'undefined' is not assignable to type 'number'.
  • L21:13: Type 'undefined' is not assignable to type 'number'.
src/lib/holocene/input/chip-input.svelte (1)
  • L73:30: 'e.clipboardData' is possibly 'null'.

Generated by 🚫 dangerJS against b48e80a

@bilal-karim bilal-karim changed the title fix: accept autocomplete prop on NumberInput, ChipInput, and Combobox fix(a11y): accept autocomplete prop on NumberInput, ChipInput, and Combobox May 22, 2026
@bilal-karim bilal-karim marked this pull request as ready for review May 22, 2026 13:23
@github-actions github-actions Bot added a11y Accessibility audit PR a11y:no-fix-doc No A11y-Audit-Ref line; audit team triage a11y:bucket-2 Bucket 2: design-mergeable, HTML / ARIA a11y:sc-1.3.5 and removed a11y:no-fix-doc No A11y-Audit-Ref line; audit team triage labels May 28, 2026
@bilal-karim bilal-karim merged commit 321651c into main May 29, 2026
20 checks passed
@bilal-karim bilal-karim deleted the a11y/input-autocomplete-props branch May 29, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y:bucket-2 Bucket 2: design-mergeable, HTML / ARIA a11y:sc-1.3.5 a11y Accessibility audit PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants