Repository navigation
fix: accessible names for icon-only action buttons on entity index pages - #3182
Conversation
… pages Icon-only <VCButton> action buttons in the entity index pages rendered only an icon with no visible text and no accessible name, so keyboard and screen-reader users could not identify the action. - Add a localized aria-label (+ title tooltip) to the "details" button on all 9 entity index pages (reusing the existing authupApp `details` key, which is the label of the [id] page it links to) and to the realms-only "set as management realm" button (new authupApp `setManagementRealm` key, authored across en/de/fr/es). - Give AEntityDelete's icon-only variant (with-text=false) an accessible name derived from its localized delete label, fixing the sibling delete button on the same rows for every consumer. Closes #3153
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThis PR adds accessible names to icon-only action buttons across nine entity index pages (clients, identity-providers, permissions, policies, realms, robots, roles, scopes, users) via localized aria-label/title attributes, backed by a new ChangesAccessible action button labels
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Setup as realms/index setup()
participant Translations as useTranslations
participant Template as realms table template
Setup->>Translations: request DETAILS, SET_MANAGEMENT_REALM
Translations-->>Setup: translations.details, translations.setManagementRealm
Setup->>Template: expose translations
Template->>Template: bind aria-label/title on details button
Template->>Template: bind aria-label/title on set-management button
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR addresses an accessibility gap in the client-web entity index tables: icon-only row action buttons (details/open and delete, plus the realms “set management realm” action) now expose localized accessible names so keyboard and screen-reader users can identify the actions.
Changes:
- Added a new i18n app key for the realms-specific “set as management realm” action across all locales.
- Updated all entity index pages to provide localized
aria-labelandtitlefor the icon-only “details” button (and the realms “set management realm” button). - Updated
AEntityDeleteso its icon-only variant (withText=false) supplies a localizedaria-labelandtitlederived from the existing delete translation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/i18n/src/constants.ts | Adds a new app translation key for “set management realm”. |
| packages/i18n/src/catalogs/en/app.ts | Adds English string for the new key. |
| packages/i18n/src/catalogs/de/app.ts | Adds German string for the new key. |
| packages/i18n/src/catalogs/fr/app.ts | Adds French string for the new key. |
| packages/i18n/src/catalogs/es/app.ts | Adds Spanish string for the new key. |
| packages/client-web-kit/src/components/utility/entity/AEntityDelete.ts | Gives icon-only delete buttons a localized accessible name + tooltip. |
| apps/client-web/pages/clients/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/roles/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/permissions/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/policies/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/users/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/realms/index/index.vue | Adds localized aria-label/title to both details and “set management realm” icon-only buttons. |
| apps/client-web/pages/identity-providers/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/robots/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
| apps/client-web/pages/scopes/index/index.vue | Adds localized aria-label/title to the icon-only details button. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
authup
@authup/client-web
@authup/server-core
@authup/access
@authup/client-web-kit
@authup/client-web-kit-theme
@authup/client-web-nuxt
@authup/client-web-theme
@authup/core-http-kit
@authup/core-kit
@authup/core-realtime-kit
@authup/errors
@authup/i18n
@authup/kit
@authup/server-adapter-kit
@authup/server-adapter-node
@authup/server-adapter-socket-io
@authup/server-adapter-web
@authup/server-kit
@authup/server-test-kit
@authup/specs
commit: |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Fixes #3153. The icon-only
<VCButton>action buttons in the#cell-optionscolumn of every entity index page rendered only a<VCIcon>with no visible text and no accessible name, so keyboard and screen-reader users couldn't identify the action.This follows the existing a11y pattern in
AToggleButton.vue(useTranslations+:aria-label).Changes
@authup/i18nauthupAppkeySET_MANAGEMENT_REALM(setManagementRealm), authored across all four locales (en/de/fr/es); locale-parity test enforces the parity.authupApp.DETAILSkey — it's literally the nav label of the[id]detail page the button links to, so no redundant key.apps/client-web— all 9 entity index pages (clients, roles, permissions, policies, users, realms, identity-providers, robots, scopes):aria-label(+:titletooltip) to thefa6-solid:bars"details" button.fa6-solid:check"set as management realm" button.useTranslationsgained theDETAILSkey; permissions/policies/realms gained a minimaluseTranslationsbatch.@authup/client-web-kit—AEntityDelete:with-text="false") was also icon-only with no accessible name — the same defect the issue title describes. Its icon-only variant now derives an accessible name (+ title) from the localized delete label. Gated onwithText(defaulttrue), so only icon-only usages are affected; every text-labelled consumer is unchanged.Notes / decisions
titlealongsidearia-label: the issue permits it ("optionally title"). Kept because thebars/checkicons are genuinely ambiguous, so a hover tooltip helps sighted mouse users too.aria-labelwins overtitlefor the accessible name (ARIA name computation), so there's no double announcement.Verification
nuxi typecheck(client-web): pass — confirms everytranslations.*binding resolves.@authup/i18ntests: 77 passed (locale parity).@authup/client-web-kittests: 7 passed.VCButtonforwards fallthrougharia-label/titleto the DOM viamergeProps(..., attrs)in both the native-button andNuxtLinkrender paths.Summary by CodeRabbit