From 81cea6b596e10111dcf7e7fdbf15e1dbfe68b46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=9B=A8=E6=B0=B4=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=B0=94-Rain?= <958414905@qq.com> Date: Wed, 8 Nov 2023 16:28:53 +0800 Subject: [PATCH] chore: add aria label for workflow table (#2995) --- .../plugin-workflow/src/client/schemas/workflows.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts b/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts index 080953571..2a94064e3 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/schemas/workflows.ts @@ -1,9 +1,10 @@ import { ISchema, useForm } from '@formily/react'; +import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client'; import { message } from 'antd'; import { useTranslation } from 'react-i18next'; -import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client'; import { NAMESPACE } from '../locale'; // import { triggers } from '../triggers'; +import React from 'react'; import { executionSchema } from './executions'; const collection = { @@ -289,7 +290,13 @@ export const workflowSchema: ISchema = { type: 'number', 'x-decorator': 'OpenDrawer', 'x-decorator-props': { - component: 'a', + component: function Com(props) { + const record = useRecord(); + return React.createElement('a', { + 'aria-label': `executed-${record.title}`, + ...props, + }); + }, }, 'x-component': 'CollectionField', 'x-read-pretty': true,