Repository navigation
docs(docs): point the input addon advice at aria-describedby - #341
Merged
Merged
Conversation
The Input page told readers to add an `aria-label` to the input that includes a prefix or suffix. An `aria-label` replaces the visible label as the field's name, so the name can drift from what people see and say (WCAG 2.5.3). Give the addon an `id` and reference it from the input with `aria-describedby` instead, as the Textarea page already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Input page's "Give inline addons text alternatives" bullet told readers to add an
aria-labelto the input that includes the prefix or suffix. Anaria-labelreplaces the visible label as the field's name, so the name can drift from what people see and say (WCAG 2.5.3).The bullet now gives the same advice as the Textarea page (changed in #338): keep the addon as readable text, give it an
idand reference it from the input witharia-describedby. It keeps the Input's own examples (a currency symbol, a unit), stays in its place in the Accessibility list, and drops the—, as #338 did on the Textarea page.Related issue
Relates to #338.
Type of change
Checklist
feat(theme): …)pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm testand everything passespnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/testsdist/,.styleframe/)mainand stays focused in scopeNotes / screenshots
One line in one Markdown file, so I ran the docs package's checks rather than the full pre-PR loop:
pnpm build:docs,pnpm --filter @styleframe/docs test,pnpm --filter @styleframe/docs test:buildandpnpm --filter @styleframe/docs typecheckall exit 0. The builtdocs/theme/components/input.htmlcarries the new link, and no built page contains the old wording.🤖 Generated with Claude Code