-
Notifications
You must be signed in to change notification settings - Fork 9.7k
fix(a11y): fix traces page accessibility violations — rowgroup tabbable #13744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 31 commits
e688e94
2ffd2d1
fa7d541
c9d45fa
f188b5b
170acde
6d5ef55
db8da2a
cd9ab69
66318cf
583afd0
d76e217
9dbde72
3c1b2cd
287ca4c
0007f20
caad567
5992048
d82723e
e6fbeb1
a1078ee
2d79e19
477fd03
c49a8db
c368ade
d36083e
2159d04
0f673d8
b36e71e
3921499
ae56cce
c1ca5d1
6e8e0f7
c16c89c
565093e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| export function applyRowTabIndices(containerEl: HTMLElement | null): void { | ||
| if (!containerEl) return; | ||
| containerEl | ||
| .querySelectorAll<HTMLElement>(".ag-center-cols-container [role='row']") | ||
| .forEach((row, idx) => { | ||
| row.setAttribute("tabindex", idx === 0 ? "0" : "-1"); | ||
| }); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,8 @@ | |
| "chat.cannotOpenDescription": "Esto no es un flujo de chat.", | ||
| "chat.cannotOpenTitle": "No se puede abrir el chat", | ||
| "chat.copied": "Copiado", | ||
| "chat.copyCode": "Copy code", | ||
| "chat.copiedCode": "Code copied", | ||
|
Comment on lines
+221
to
+222
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Translate the new Spanish locale entries. These additions are still English literals, so Also applies to: 1953-1956 🤖 Prompt for AI Agents |
||
| "chat.copyMessage": "Copiar mensaje", | ||
| "chat.defaultSession": "Sesión predeterminada", | ||
| "chat.deleteSessionsCount_one": "Eliminar una sesión de « {{count}} »", | ||
|
|
@@ -1948,6 +1950,10 @@ | |
| "trace.clearAll": "Borrar todo", | ||
| "trace.clearAllConfirm": "¿Estás seguro de que quieres borrar todos los registros? Esto eliminará de forma permanente todos los registros de actividad de Flow relacionados y no se podrá deshacer.", | ||
| "trace.clearAllRecords": "Borrar todos los registros", | ||
| "trace.tableAriaLabel": "Trace runs table", | ||
| "trace.statusFilterLabel": "Filter by status", | ||
| "trace.expandSpan": "Expand span", | ||
| "trace.collapseSpan": "Collapse span", | ||
| "trace.clearDates": "Borrar fechas", | ||
| "trace.clearError": "Error al borrar registros", | ||
| "trace.clearedSuccess": "Los registros se han borrado correctamente", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,8 @@ | |
| "chat.cannotOpenDescription": "Ce n'est pas un flux de conversation.", | ||
| "chat.cannotOpenTitle": "Impossible d'ouvrir la discussion", | ||
| "chat.copied": "Copié", | ||
| "chat.copyCode": "Copy code", | ||
| "chat.copiedCode": "Code copied", | ||
|
Comment on lines
+221
to
+222
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Localize these new French strings before shipping. These entries are still English, so the French UI will expose English button/table labels to screen readers and sighted users instead of localized copy. Also applies to: 1953-1956 🤖 Prompt for AI Agents |
||
| "chat.copyMessage": "Copier le message", | ||
| "chat.defaultSession": "Session par défaut", | ||
| "chat.deleteSessionsCount_one": "Supprimer la session d' {{count}}", | ||
|
|
@@ -1948,6 +1950,10 @@ | |
| "trace.clearAll": "Effacer tout", | ||
| "trace.clearAllConfirm": "Êtes-vous sûr de vouloir effacer tous les enregistrements? Cette opération supprimera définitivement toutes les traces d'activité de flux associées et ne pourra pas être annulée.", | ||
| "trace.clearAllRecords": "Effacer tous les enregistrements", | ||
| "trace.tableAriaLabel": "Trace runs table", | ||
| "trace.statusFilterLabel": "Filter by status", | ||
| "trace.expandSpan": "Expand span", | ||
| "trace.collapseSpan": "Collapse span", | ||
| "trace.clearDates": "Effacer les dates", | ||
| "trace.clearError": "Erreur lors de la suppression des enregistrements", | ||
| "trace.clearedSuccess": "Les enregistrements ont été effacés avec succès", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,8 @@ | |
| "chat.cannotOpenDescription": "これはチャットフローではありません。", | ||
| "chat.cannotOpenTitle": "チャットが開けません", | ||
| "chat.copied": "コピーされました", | ||
| "chat.copyCode": "Copy code", | ||
| "chat.copiedCode": "Code copied", | ||
|
Comment on lines
+221
to
+222
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Replace these English placeholders with Japanese copy. Because the keys exist in the Japanese bundle, screen readers will announce these controls in English instead of Japanese. That undermines the a11y fix for Also applies to: 1953-1956 🤖 Prompt for AI Agents |
||
| "chat.copyMessage": "メッセージをコピーする", | ||
| "chat.defaultSession": "デフォルトのセッション", | ||
| "chat.deleteSessionsCount_one": "{{count}} のセッションを削除する", | ||
|
|
@@ -1948,6 +1950,10 @@ | |
| "trace.clearAll": "すべて消去", | ||
| "trace.clearAllConfirm": "すべての記録を削除してもよろしいですか? これにより、関連するすべてのフローアクティビティトレースが完全に削除され、元に戻すことはできません。", | ||
| "trace.clearAllRecords": "すべての記録を消去", | ||
| "trace.tableAriaLabel": "Trace runs table", | ||
| "trace.statusFilterLabel": "Filter by status", | ||
| "trace.expandSpan": "Expand span", | ||
| "trace.collapseSpan": "Collapse span", | ||
| "trace.clearDates": "日付を消去", | ||
| "trace.clearError": "レコードの削除中にエラーが発生しました", | ||
| "trace.clearedSuccess": "レコードのクリアに成功しました", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,8 @@ | |
| "chat.cannotOpenDescription": "Isso não é um fluxo de chat.", | ||
| "chat.cannotOpenTitle": "Não é possível abrir o chat", | ||
| "chat.copied": "Copiado!", | ||
| "chat.copyCode": "Copy code", | ||
| "chat.copiedCode": "Code copied", | ||
|
Comment on lines
+221
to
+222
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win These The new aria-labels and control labels will render in English for Portuguese users, so this locale stays partially untranslated in the exact accessibility path this PR is fixing. Also applies to: 1953-1956 🤖 Prompt for AI Agents |
||
| "chat.copyMessage": "Copiar mensagem", | ||
| "chat.defaultSession": "Sessão padrão", | ||
| "chat.deleteSessionsCount_one": "Excluir a sessão do {{count}}", | ||
|
|
@@ -1948,6 +1950,10 @@ | |
| "trace.clearAll": "Limpar Tudo", | ||
| "trace.clearAllConfirm": "Tem certeza de que deseja apagar todos os registros? Isso excluirá permanentemente todos os rastros de atividade do fluxo relacionados e não poderá ser desfeito.", | ||
| "trace.clearAllRecords": "Limpar todos os registros", | ||
| "trace.tableAriaLabel": "Trace runs table", | ||
| "trace.statusFilterLabel": "Filter by status", | ||
| "trace.expandSpan": "Expand span", | ||
| "trace.collapseSpan": "Collapse span", | ||
| "trace.clearDates": "Limpar datas", | ||
| "trace.clearError": "Erro ao limpar registros", | ||
| "trace.clearedSuccess": "Os registros foram apagados com sucesso", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,8 @@ | |
| "chat.cannotOpenDescription": "这不是一个聊天流程。", | ||
| "chat.cannotOpenTitle": "无法打开聊天窗口", | ||
| "chat.copied": "已复制!", | ||
| "chat.copyCode": "Copy code", | ||
| "chat.copiedCode": "Code copied", | ||
|
Comment on lines
+221
to
+222
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Localize the new Right now these values are English, so the copy button and trace controls won't have Simplified Chinese labels in this locale. Also applies to: 1953-1956 🤖 Prompt for AI Agents |
||
| "chat.copyMessage": "复制消息", | ||
| "chat.defaultSession": "默认会话", | ||
| "chat.deleteSessionsCount_one": "删除 {{count}} 会话", | ||
|
|
@@ -1948,6 +1950,10 @@ | |
| "trace.clearAll": "全部清除", | ||
| "trace.clearAllConfirm": "您确定要清除所有记录吗? 这将永久删除所有相关的流程活动跟踪记录,且无法撤销。", | ||
| "trace.clearAllRecords": "清除所有记录", | ||
| "trace.tableAriaLabel": "Trace runs table", | ||
| "trace.statusFilterLabel": "Filter by status", | ||
| "trace.expandSpan": "Expand span", | ||
| "trace.collapseSpan": "Collapse span", | ||
| "trace.clearDates": "清除日期", | ||
| "trace.clearError": "清除记录时发生错误", | ||
| "trace.clearedSuccess": "记录已成功清除", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import { applyRowTabIndices } from "@/components/core/parameterRenderComponent/components/tableComponent/utils/applyRowTabIndices"; | ||
|
|
||
| function makeGrid(rowCount: number): HTMLElement { | ||
| const container = document.createElement("div"); | ||
| const colsContainer = document.createElement("div"); | ||
| colsContainer.className = "ag-center-cols-container"; | ||
|
|
||
| for (let i = 0; i < rowCount; i++) { | ||
| const row = document.createElement("div"); | ||
| row.setAttribute("role", "row"); | ||
| colsContainer.appendChild(row); | ||
| } | ||
|
|
||
| container.appendChild(colsContainer); | ||
| return container; | ||
| } | ||
|
|
||
| describe("applyRowTabIndices — rowgroup tabbable fix", () => { | ||
| it("sets tabindex=0 on the first row and -1 on all others", () => { | ||
| const container = makeGrid(3); | ||
| applyRowTabIndices(container); | ||
|
|
||
| const rows = container.querySelectorAll<HTMLElement>("[role='row']"); | ||
| expect(rows[0].getAttribute("tabindex")).toBe("0"); | ||
| expect(rows[1].getAttribute("tabindex")).toBe("-1"); | ||
| expect(rows[2].getAttribute("tabindex")).toBe("-1"); | ||
| }); | ||
|
|
||
| it("handles a single row — that row gets tabindex=0", () => { | ||
| const container = makeGrid(1); | ||
| applyRowTabIndices(container); | ||
|
|
||
| const rows = container.querySelectorAll<HTMLElement>("[role='row']"); | ||
| expect(rows[0].getAttribute("tabindex")).toBe("0"); | ||
| }); | ||
|
|
||
| it("does nothing when containerEl is null", () => { | ||
| expect(() => applyRowTabIndices(null)).not.toThrow(); | ||
| }); | ||
|
|
||
| it("does nothing when there are no rows", () => { | ||
| const container = makeGrid(0); | ||
| applyRowTabIndices(container); | ||
|
|
||
| const rows = container.querySelectorAll("[role='row']"); | ||
| expect(rows.length).toBe(0); | ||
| }); | ||
|
|
||
| it("overwrites any existing tabindex on rows", () => { | ||
| const container = makeGrid(2); | ||
| const rows = container.querySelectorAll<HTMLElement>("[role='row']"); | ||
| rows[0].setAttribute("tabindex", "5"); | ||
| rows[1].setAttribute("tabindex", "5"); | ||
|
|
||
| applyRowTabIndices(container); | ||
|
|
||
| expect(rows[0].getAttribute("tabindex")).toBe("0"); | ||
| expect(rows[1].getAttribute("tabindex")).toBe("-1"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Translate the new German locale entries.
These additions are still English literals, so
deusers will get mixed-language UI text and ARIA labels instead of German.Also applies to: 1953-1956
🤖 Prompt for AI Agents