Repository navigation
Conversation
TextArea had no way to set aria-label on its textarea, so a textarea without a visible label had no accessible name. Add an ariaLabel prop, matching Input, and forward it from TextAreaField. Implements LIBS-851 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alexcpn
force-pushed
the
LIBS-851/textarea-aria-label
branch
from
December 4, 2026 13:44
2106bda to
84a56cc
Compare
|
This branch has not been 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.



Implements LIBS-851
Description
Inputaccepts anariaLabelprop and renders it asaria-labelon the<input>.TextAreahad no equivalent, so a textarea without a visible<label>had no accessible name (WCAG 4.1.2).This PR:
ariaLabelprop toTextAreaand renders it asaria-labelon the<textarea>ariaLabeltoTextAreaFieldand forwards it toTextAreatypes/index.d.tsand regeneratesAPI.mdWhen the prop isn't set, nothing is rendered (
aria-labelis omitted), so existing usage is unchanged.Not in this PR: the ticket also asks for
TextAreaFieldto wirearia-describedbyto its help/validation text "matching InputField behaviour". Onmaster,InputFielddoesn't do that (and doesn't forwardariaLabeleither), so there's no existing pattern to match. That would be aField-level change that affects every field component, and I think it deserves its own ticket/PR. I'm happy to do it if you agree on the approach.How it was tested
TextAreaandTextAreaField: withariaLabel, the textbox is found by its accessible name and has the attribute; without it, there is noaria-label. TheariaLabeltests fail onmasterand pass with this change.text-areatests pass (6).eslintandprettier --checkare clean.API.mdwas regenerated withscripts/generate-api-docs.js. The only diff is the newariaLabelrows.Known issues
Checklist
No Storybook demo was added: the prop has no visual effect.
AI disclosure
This change was written and tested by an AI model, Claude Opus 5.5 (via Claude Code), and submitted by a human contributor.
#T4G (tokens for good project)
🤖 Generated with Claude Code