From e64456296951c99ca226365e20b1296d36fe0100 Mon Sep 17 00:00:00 2001 From: Savelii Date: Thu, 27 Aug 2026 14:18:50 +0000 Subject: [PATCH] fix(editor): Improve screen reader support for scope selector tool pills (#37159) Co-authored-by: Claude Fable 5 --- .../frontend/@n8n/i18n/src/locales/en.json | 2 + .../app/components/scopes/ScopesSelector.vue | 20 ++++- .../src/app/views/OAuthConsentView.test.ts | 85 +++++++++++++++++++ 3 files changed, 105 insertions(+), 2 deletions(-) diff --git a/packages/frontend/@n8n/i18n/src/locales/en.json b/packages/frontend/@n8n/i18n/src/locales/en.json index 0c41486ff95..daa96b94c2b 100644 --- a/packages/frontend/@n8n/i18n/src/locales/en.json +++ b/packages/frontend/@n8n/i18n/src/locales/en.json @@ -2621,7 +2621,9 @@ "oauth.consentView.scopes.group.dataTables": "Data tables", "oauth.consentView.scopes.group.projectsAndFolders": "Projects and folders", "oauth.consentView.scopes.tools.count": "{count} tool | {count} tools", + "oauth.consentView.scopes.tools.enabled": "enabled", "oauth.consentView.scopes.tools.enabledOf": "{enabled} of {total} tools enabled", + "oauth.consentView.scopes.tools.notEnabled": "not enabled", "oauth.consentView.allow": "Allow access", "oauth.consentView.redirectWarning.title": "After you allow, access to this instance is sent to:", "oauth.consentView.redirectWarning.confirm": "I recognize and trust this URL", diff --git a/packages/frontend/editor-ui/src/app/components/scopes/ScopesSelector.vue b/packages/frontend/editor-ui/src/app/components/scopes/ScopesSelector.vue index 381ba079d6e..744227cf2b5 100644 --- a/packages/frontend/editor-ui/src/app/components/scopes/ScopesSelector.vue +++ b/packages/frontend/editor-ui/src/app/components/scopes/ScopesSelector.vue @@ -2,7 +2,7 @@ import { computed, ref, watch } from 'vue'; import { capitalCase } from 'change-case'; -import { CollapsibleRoot, CollapsibleTrigger } from 'reka-ui'; +import { CollapsibleRoot, CollapsibleTrigger, VisuallyHidden } from 'reka-ui'; import { useI18n } from '@n8n/i18n'; import type { BaseTextKey } from '@n8n/i18n'; @@ -47,7 +47,7 @@ const props = withDefaults( * Tool names each scope unlocks. When provided, group rows show a tool * count pill whose popover lists the tools enabled by the current * selection. Expected i18n keys under the prefix: `.tools.count`, - * `.tools.enabledOf`. + * `.tools.enabled`, `.tools.enabledOf`, `.tools.notEnabled`. */ scopeTools?: Record; }>(), @@ -345,8 +345,12 @@ function toggleScope(scope: S, checked: boolean) { :data-test-id="`scope-group-${group.key}`" @update:model-value="(checked: boolean) => toggleGroup(group, checked)" /> + {{ tool }} + + + {{ + groupEnabledTools(group).has(tool) + ? baseText('tools.enabled') + : baseText('tools.notEnabled') + }} + @@ -428,6 +440,8 @@ function toggleScope(scope: S, checked: boolean) {