frontend: Fix ARIA labels for input fields#4345
Conversation
frontend/src/components/secret/__snapshots__/Details.WithBase.stories.storyshot
Outdated
Show resolved
Hide resolved
03eba6e to
f177d51
Compare
f177d51 to
6717879
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves accessibility for secret field inputs by adding proper ARIA labels to associate input fields with their corresponding labels, addressing FastPass accessibility violations.
Changes:
- Added
nameIDprop toSecretFieldcomponent andNameValueTableRowinterface - Implemented
aria-labelledbyattribute on input elements to reference label IDs - Refactored Details.tsx to use destructuring for cleaner code and proper type casting
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/components/common/Resource/Resource.tsx | Added SecretFieldProps interface with nameID prop and applied aria-labelledby to Input component |
| frontend/src/components/secret/Details.tsx | Refactored data mapping to use destructuring and pass nameID to SecretField |
| frontend/src/components/secret/snapshots/Details.WithBase.stories.storyshot | Updated snapshot to reflect new ID and aria-labelledby attributes in rendered output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: illume, vyncent-t The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
This PR fixes some a11y issues around missing labels for inputs in our custom component for secrets data fields.
FastPass scan

Inputs that need fixes

Related Issue
Fixes #4344
Changes
Steps to Test