chore: add aria label for workflow table (#2995)

This commit is contained in:
被雨水过滤的空气-Rain 2023-11-08 16:28:53 +08:00 committed by GitHub
parent 5b9695e720
commit 81cea6b596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,10 @@
import { ISchema, useForm } from '@formily/react'; import { ISchema, useForm } from '@formily/react';
import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client';
import { message } from 'antd'; import { message } from 'antd';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useActionContext, useRecord, useResourceActionContext, useResourceContext } from '@nocobase/client';
import { NAMESPACE } from '../locale'; import { NAMESPACE } from '../locale';
// import { triggers } from '../triggers'; // import { triggers } from '../triggers';
import React from 'react';
import { executionSchema } from './executions'; import { executionSchema } from './executions';
const collection = { const collection = {
@ -289,7 +290,13 @@ export const workflowSchema: ISchema = {
type: 'number', type: 'number',
'x-decorator': 'OpenDrawer', 'x-decorator': 'OpenDrawer',
'x-decorator-props': { '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-component': 'CollectionField',
'x-read-pretty': true, 'x-read-pretty': true,