Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): use concise accessible names for infotips (#42751)

yyhc9e59a55908d
diff --git a/packages/dify-ui/README.md b/packages/dify-ui/README.md
index 3d344e59101..318fd307797 100644
--- a/packages/dify-ui/README.md
+++ b/packages/dify-ui/README.md
@@ -64,6 +64,7 @@ Upstream behavior remains owned by the [Base UI documentation].
| ------------- | ------------------------------------------------------------------------------------------- |
| [Button] | Action semantics, submit and link choices, loading versus disabled, and content spacing. |
| [Icon Button] | Accessible names, decorative glyphs, appearance ownership, and primitive composition. |
+| [Infotip] | Explanation triggers, concise dialog names, and hint surface ownership. |
| [Input Group] | Compound input anatomy, shared-surface ownership, DOM order, focus, and interactive addons. |
### Cross-component guides
@@ -89,6 +90,7 @@ For a known contract, go directly to its guide above.
[Button]: ./src/button/README.md
[Forms]: ./docs/forms.md
[Icon Button]: ./src/icon-button/README.md
+[Infotip]: ./src/infotip/README.md
[Input Group]: ./src/input-group/README.md
[Overlays]: ./docs/overlays.md
[Public API authoring]: ./docs/authoring.md
diff --git a/packages/dify-ui/docs/accessible-names-and-descriptions.md b/packages/dify-ui/docs/accessible-names-and-descriptions.md
index 71c3cbaafa6..6c455ec32b2 100644
--- a/packages/dify-ui/docs/accessible-names-and-descriptions.md
+++ b/packages/dify-ui/docs/accessible-names-and-descriptions.md
@@ -126,12 +126,9 @@ with a second label or a competing error association:
```
Use `DialogTitle` and, when useful, `DialogDescription` for a short dialog summary. Do not turn a
-whole form or rich dialog body into one description. Per [Base UI Tooltip guidance], Tooltip is a
-supplemental visual label, not the trigger's accessible-name source. Base UI specifically recommends
-an `aria-label` that closely matches the Tooltip content; apply that to icon-only triggers. When
-persistent visible trigger text already supplies the name, preserve the content-derived name per
-W3C and MDN guidance instead of adding a redundant override merely because Tooltip is present. Use
-[Overlay] choices for essential, structured, interactive, or touch-reachable information.
+whole form or rich dialog body into one description. Tooltip content is not the trigger's
+accessible-name source: icon-only triggers still need their own name, while persistent visible
+trigger text should continue to name the control.
Prefer descriptions associated with DOM text. When considering `aria-description`, verify target
browser and assistive-technology behavior. The [AccName 1.2 working draft] gives
@@ -159,7 +156,6 @@ that source computes to an empty description. Do not stack mechanisms to force r
[APG]: https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions#namingtechniques
[AccName 1.2 working draft]: https://www.w3.org/TR/accname-1.2#mapping_additional_nd_description
-[Base UI Tooltip guidance]: https://base-ui.com/react/components/tooltip#usage-guidelines
[Base UI accessibility]: https://base-ui.com/react/overview/accessibility
[Button]: ../src/button/README.md
[Forms]: forms.md
diff --git a/packages/dify-ui/docs/overlays.md b/packages/dify-ui/docs/overlays.md
index 1274ce1b274..836c1652766 100644
--- a/packages/dify-ui/docs/overlays.md
+++ b/packages/dify-ui/docs/overlays.md
@@ -64,8 +64,10 @@ Toast remains one layer above ordinary overlays.
- Use `AlertDialog` only for a destructive or must-confirm decision requiring an explicit answer.
- Use `Drawer` for side-panel interactions that follow the drawer model.
- Use `DropdownMenu` for button-triggered action lists and `ContextMenu` for context actions.
-- Use [`Tooltip`] only for a short, non-interactive visual label. The trigger already needs an
- accessible name; use Popover for information users must reach on touch.
+- Use [`Tooltip`] for a supplementary visual label on a control that already has a primary
+ action and an accessible name. Use `Infotip` when the information icon's action is to open
+ the explanation. Text length alone does not determine the component. Follow the
+ [Infotip contract] for its composition and accessible names.
- Use [`PreviewCard`] as a non-interactive enhancement for a link destination. Essential
information must also exist without the preview.
- Use [`Popover`] for explanatory, structured, or interactive content that users must reach on
@@ -76,6 +78,7 @@ renders a non-button element, set `nativeButton={false}`. Let the primitive own
spacing unless its API documents a measured exception.
[Base UI Portal]: https://base-ui.com/react/overview/quick-start#portals
+[Infotip contract]: ../src/infotip/README.md
[MDN `isolation`]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/isolation
[`Dialog.Portal`]: https://base-ui.com/react/components/dialog#portal
[`Popover`]: https://base-ui.com/react/components/popover
diff --git a/packages/dify-ui/src/infotip/README.md b/packages/dify-ui/src/infotip/README.md
new file mode 100644
index 00000000000..10661f7e15f
--- /dev/null
+++ b/packages/dify-ui/src/infotip/README.md
@@ -0,0 +1,55 @@
+# Infotip
+
+Use `Infotip` when an information icon's primary action is opening an explanation. Use
+`Tooltip` when the trigger already has another primary action and only needs a visual hint.
+
+## Naming
+
+Prefer an existing visible topic. It can name both the trigger and the dialog:
+
+```tsx
+function ProcessingHint() {
+ const labelId = useId()
+
+ return (
+ <div className="flex items-center gap-1">
+ <span id={labelId}>Document processing</span>
+ <Infotip>
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId}>
+ Documents are processed in the order they are received.
+ </InfotipContent>
+ </Infotip>
+ </div>
+ )
+}
+```
+
+If the popup has its own visible title, use `InfotipTitle`. It gives the dialog its accessible name:
+
+```tsx
+<Infotip>
+ <InfotipTrigger aria-label="Processing priority" />
+ <InfotipContent>
+ <InfotipTitle>Processing priority</InfotipTitle>
+ <p>Priority determines which documents are processed first.</p>
+ </InfotipContent>
+</Infotip>
+```
+
+Keep explanations, links, and other structured content as normal popup children rather than
+turning the whole body into the dialog description.
+
+A few rules:
+
+- The trigger's name must exist while the popup is closed.
+- Prefer `aria-labelledby` when a suitable visible topic already exists; otherwise use a short
+ localized `aria-label`.
+- Sharing one short topic between the trigger and dialog is valid. Do not copy the full explanation
+ into their accessible names.
+- Do not derive names from React children or automatically describe the dialog with its entire body.
+
+## Visual ownership
+
+Infotip owns its hint surface, spacing, typography, radius, and shadow. Callers may constrain width
+or preserve intentional line breaks.
diff --git a/packages/dify-ui/src/infotip/index.stories.tsx b/packages/dify-ui/src/infotip/index.stories.tsx
index da7311fc2e5..00cceb09d5b 100644
--- a/packages/dify-ui/src/infotip/index.stories.tsx
+++ b/packages/dify-ui/src/infotip/index.stories.tsx
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react-vite'
import * as React from 'react'
import { expect, userEvent, waitFor, within } from 'storybook/test'
-import { Infotip, InfotipContent, InfotipTrigger } from '.'
+import { Infotip, InfotipContent, InfotipTitle, InfotipTrigger } from '.'
import { Button } from '../button'
const meta = {
@@ -12,7 +12,7 @@ const meta = {
docs: {
description: {
component:
- 'An information button that opens explanatory content using Popover semantics. Compose the root, icon trigger, and content. Name the trigger and the dialog; use aria-labelledby when a visible heading exists. The popup remains available to keyboard and touch users and may contain links.',
+ 'An information button whose primary action is opening an explanation. Unlike Tooltip, it uses Popover semantics and supports click, touch, keyboard, and links. Name the trigger and dialog with a short topic, preferably referencing an existing visible label. Keep the explanation in the body; do not copy it into aria-label.',
},
},
},
@@ -21,19 +21,24 @@ const meta = {
export default meta
type Story = StoryObj<typeof meta>
-export const Default: Story = {
- render: () => (
+function ProcessingHint() {
+ const labelId = React.useId()
+ return (
<div className="flex items-center gap-1 text-text-secondary">
- Document processing
+ <span id={labelId}>Document processing</span>
<Infotip>
- <InfotipTrigger aria-label="Document processing" />
- <InfotipContent aria-label="Document processing">
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId}>
Documents are processed in the order they are received. Larger files can take longer to
finish indexing.
</InfotipContent>
</Infotip>
</div>
- ),
+ )
+}
+
+export const Default: Story = {
+ render: () => <ProcessingHint />,
play: async ({ canvasElement }) => {
const canvas = within(canvasElement)
const body = within(canvasElement.ownerDocument.body)
@@ -75,6 +80,22 @@ export const WithLink: Story = {
},
}
+function HeadingHint() {
+ return (
+ <Infotip defaultOpen>
+ <InfotipTrigger aria-label="Processing priority" />
+ <InfotipContent>
+ <InfotipTitle>Processing priority</InfotipTitle>
+ <p>Priority determines which documents are processed first.</p>
+ </InfotipContent>
+ </Infotip>
+ )
+}
+
+export const WithHeading: Story = {
+ render: () => <HeadingHint />,
+}
+
function ControlledExample() {
const [open, setOpen] = React.useState(false)
return (
diff --git a/packages/dify-ui/src/infotip/index.tsx b/packages/dify-ui/src/infotip/index.tsx
index 5222104ad94..98e4e4d6ba0 100644
--- a/packages/dify-ui/src/infotip/index.tsx
+++ b/packages/dify-ui/src/infotip/index.tsx
@@ -22,7 +22,9 @@ const iconSizeClassNames = {
} as const
const Infotip = BasePopover.Root
+const InfotipTitle = BasePopover.Title
type InfotipProps<Payload = unknown> = BasePopover.Root.Props<Payload>
+type InfotipTitleProps = BasePopover.Title.Props
type InfotipTriggerProps<Payload = unknown> = Omit<
BasePopover.Trigger.Props<Payload>,
@@ -103,5 +105,5 @@ function InfotipContent({
)
}
-export { Infotip, InfotipContent, InfotipTrigger }
-export type { InfotipContentProps, InfotipProps, InfotipTriggerProps }
+export { Infotip, InfotipContent, InfotipTitle, InfotipTrigger }
+export type { InfotipContentProps, InfotipProps, InfotipTitleProps, InfotipTriggerProps }
diff --git a/packages/dify-ui/src/tooltip/index.stories.tsx b/packages/dify-ui/src/tooltip/index.stories.tsx
index b0dccc43b88..0468cd6c011 100644
--- a/packages/dify-ui/src/tooltip/index.stories.tsx
+++ b/packages/dify-ui/src/tooltip/index.stories.tsx
@@ -22,7 +22,7 @@ const meta = {
docs: {
description: {
component:
- 'Compound tooltip built on Base UI Tooltip. Wrap the app in `TooltipProvider` (done automatically in these stories) so multiple tooltips share open/close delays. Each tooltip pairs a `TooltipTrigger` with a `TooltipContent` and supports placement and offsets.\n\n**Usage contract** (mirrors the [Base UI tooltip guidelines](https://base-ui.com/react/components/tooltip#alternatives-to-tooltips)):\n\n- Tooltips are **supplementary visual labels** for sighted mouse and keyboard users. They are disabled on touch devices and are not announced to screen readers.\n- The trigger **must carry its own `aria-label` or visible text** that matches the tooltip — the tooltip does not replace labeling.\n- Keep content short and non-interactive (an icon-button label, a keyboard shortcut, one-word clarification).\n- **Do not** place descriptions, prose, links, or interactive controls inside a tooltip — touch and screen-reader users cannot reach them.\n- For hover-triggered rich previews that users move their cursor onto, use `PreviewCard` (dwell-able, structured content).\n- For an info icon that explains a concept (an "infotip"), or for any hover popup that needs interactive content or to reach touch/assistive-tech users, use `Popover` with `openOnHover` on the trigger.',
+ 'Compound tooltip built on Base UI Tooltip. Wrap the app in `TooltipProvider` so nested tooltips share open and close delays. Each tooltip pairs a `TooltipTrigger` with `TooltipContent` and supports placement and offsets.',
},
},
},
@@ -45,7 +45,7 @@ export const IconButton: Story = {
docs: {
description: {
story:
- 'The canonical tooltip use case: an icon-only button surfaces its accessible label as a tooltip for sighted mouse and keyboard users. The trigger already carries `aria-label` — the tooltip mirrors that label visually; it does **not** replace it.',
+ 'Icon-only actions keep their own accessible name while the tooltip provides the matching visual label.',
},
},
},
@@ -71,8 +71,7 @@ export const KeyboardShortcut: Story = {
parameters: {
docs: {
description: {
- story:
- 'A short, supplementary hint that surfaces a keyboard shortcut next to a visible button label. The trigger is fully self-describing ("Save"); the tooltip only adds non-essential extra clarity for mouse/keyboard users.',
+ story: 'A visible button label can use a tooltip for a supplementary keyboard shortcut.',
},
},
},
diff --git a/packages/dify-ui/src/tooltip/index.tsx b/packages/dify-ui/src/tooltip/index.tsx
index 711818d1578..e34c8ca2a3a 100644
--- a/packages/dify-ui/src/tooltip/index.tsx
+++ b/packages/dify-ui/src/tooltip/index.tsx
@@ -8,25 +8,6 @@ import { resolveClassName } from '../internals/resolve-class-name'
import { hintPopupClassName } from '../overlay-shared'
import { parsePlacement } from '../placement'
-/**
- * Tooltip is an **ephemeral hint** tied to a trigger (typically an icon button,
- * badge, or short label). It follows Base UI's Tooltip semantics:
- *
- * - Opens on pointer hover or keyboard focus on the trigger.
- * - Closes as soon as the pointer leaves the trigger — the popup itself is
- * **not dwell-able**; users cannot move their cursor onto the tooltip.
- * - Must contain only short, non-interactive text. No links, buttons, form
- * controls, or structured panels.
- *
- * If you need any of the following, use `PreviewCard` instead (hover-triggered
- * rich preview that users can move their cursor onto):
- *
- * - Multi-line or structured content (icon + title + metadata)
- * - Content the user needs to "stop and read" for more than ~1 second
- * - Content wider than ~300px
- *
- * If you need interactive affordances (buttons, links, forms) use `Popover`.
- */
const TooltipProvider = BaseTooltip.Provider
const Tooltip = BaseTooltip.Root
const TooltipTrigger = BaseTooltip.Trigger
diff --git a/web/__tests__/billing/billing-integration.test.tsx b/web/__tests__/billing/billing-integration.test.tsx
index 0e7d229c86f..08c2017e614 100644
--- a/web/__tests__/billing/billing-integration.test.tsx
+++ b/web/__tests__/billing/billing-integration.test.tsx
@@ -171,11 +171,10 @@ describe('Billing Page + Plan Integration', () => {
render(<PlanComp loc="test" />)
const quotaCard = screen.getByRole('group', { name: /usagePage\.teamMembers/i })
- const quotaLabel = within(quotaCard).getByText(/usagePage\.teamMembers/i)
- const quotaValue = within(quotaCard).getByTestId('billing-quota-value')
+ const quotaLabel = within(quotaCard).getByRole('term')
+ const quotaValue = within(quotaCard).getByRole('definition')
- expect(quotaLabel.tagName).toBe('DT')
- expect(quotaValue.tagName).toBe('DD')
+ expect(quotaLabel).toHaveTextContent(/usagePage\.teamMembers/i)
expect(quotaValue).toHaveTextContent(/3\s*\/\s*5/)
})
@@ -188,7 +187,7 @@ describe('Billing Page + Plan Integration', () => {
render(<PlanComp loc="test" />, {}, true)
const quotaCard = screen.getByRole('group', { name: /usagePage\.vectorSpace/i })
- const quotaValue = within(quotaCard).getByTestId('billing-quota-value')
+ const quotaValue = within(quotaCard).getByRole('definition')
expect(quotaValue).toHaveTextContent('--')
expect(quotaValue).not.toHaveTextContent('< 50')
})
diff --git a/web/app/components/app/app-access-control/__tests__/index.spec.tsx b/web/app/components/app/app-access-control/__tests__/index.spec.tsx
index 946ba118a9c..d7101ea8a5e 100644
--- a/web/app/components/app/app-access-control/__tests__/index.spec.tsx
+++ b/web/app/components/app/app-access-control/__tests__/index.spec.tsx
@@ -232,7 +232,7 @@ describe('AccessControl', () => {
})
expect(publicOption).toHaveAttribute('aria-disabled', 'true')
expect(
- screen.getByLabelText('app.accessControlDialog.webAppPublicAccessDisabledTip'),
+ screen.getByRole('button', { name: 'app.accessControlDialog.accessItems.anyone' }),
).toBeInTheDocument()
})
})
diff --git a/web/app/components/app/app-access-control/access-control-form.tsx b/web/app/components/app/app-access-control/access-control-form.tsx
index 14e466147b0..300f3b1fa10 100644
--- a/web/app/components/app/app-access-control/access-control-form.tsx
+++ b/web/app/components/app/app-access-control/access-control-form.tsx
@@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next'
import { AccessMode as AccessModeValue } from '@/models/access-control'
import AccessControlDialog from './access-control-dialog'
import AccessControlItem from './access-control-item'
-import SpecificGroupsOrMembers, { WebAppSSONotEnabledTip } from './specific-groups-or-members'
+import SpecificGroupsOrMembers from './specific-groups-or-members'
export type AccessControlFormProps = {
accessMode: AccessMode
@@ -43,6 +43,8 @@ export function AccessControlForm({
onClose,
onConfirm,
}: AccessControlFormProps) {
+ const publicAccessLabelId = useId()
+ const externalAccessLabelId = useId()
const accessControlOptionsLabelId = useId()
const { t } = useTranslation()
const confirmDisabled =
@@ -97,32 +99,37 @@ export function AccessControlForm({
aria-hidden="true"
className="i-ri-verified-badge-line size-4 text-text-primary"
/>
- <p className="system-sm-medium text-text-primary">
+ <p id={externalAccessLabelId} className="system-sm-medium text-text-primary">
{t(($) => $['accessControlDialog.accessItems.external'], { ns: 'app' })}
</p>
</div>
- {!externalMembersTipHidden && <WebAppSSONotEnabledTip />}
+ {!externalMembersTipHidden && (
+ <Infotip>
+ <InfotipTrigger
+ aria-labelledby={externalAccessLabelId}
+ className="text-text-warning-secondary hover:text-text-warning-secondary"
+ iconSize="large"
+ />
+ <InfotipContent aria-labelledby={externalAccessLabelId}>
+ {t(($) => $['accessControlDialog.webAppSSONotEnabledTip'], { ns: 'app' })}
+ </InfotipContent>
+ </Infotip>
+ )}
</div>
</AccessControlItem>
<AccessControlItem type={AccessModeValue.PUBLIC} disabled={publicAccessDisabled}>
<div className="flex items-center gap-x-2 p-3">
<span aria-hidden="true" className="i-ri-global-line size-4 text-text-primary" />
- <p className="system-sm-medium text-text-primary">
+ <p id={publicAccessLabelId} className="system-sm-medium text-text-primary">
{t(($) => $['accessControlDialog.accessItems.anyone'], { ns: 'app' })}
</p>
{publicAccessDisabled && (
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['accessControlDialog.webAppPublicAccessDisabledTip'], {
- ns: 'app',
- })}
+ aria-labelledby={publicAccessLabelId}
className="h-4 w-4 shrink-0 text-text-warning-secondary hover:text-text-warning-secondary"
/>
- <InfotipContent
- aria-label={t(($) => $['accessControlDialog.webAppPublicAccessDisabledTip'], {
- ns: 'app',
- })}
- >
+ <InfotipContent aria-labelledby={publicAccessLabelId}>
{t(($) => $['accessControlDialog.webAppPublicAccessDisabledTip'], {
ns: 'app',
})}
diff --git a/web/app/components/app/app-access-control/specific-groups-or-members.tsx b/web/app/components/app/app-access-control/specific-groups-or-members.tsx
index 2607df37e25..6d6287361bd 100644
--- a/web/app/components/app/app-access-control/specific-groups-or-members.tsx
+++ b/web/app/components/app/app-access-control/specific-groups-or-members.tsx
@@ -3,7 +3,6 @@ import type { AccessControlAccount, AccessControlGroup } from '@/models/access-c
import { Avatar } from '@langgenius/dify-ui/avatar'
import { Button } from '@langgenius/dify-ui/button'
import { IconButton } from '@langgenius/dify-ui/icon-button'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { useTranslation } from 'react-i18next'
import { LoadingPlaceholder } from '@/app/components/base/loading-placeholder'
import { AccessMode } from '@/models/access-control'
@@ -216,19 +215,3 @@ function BaseItem({ icon, onRemove, children }: BaseItemProps) {
</div>
)
}
-
-export function WebAppSSONotEnabledTip() {
- const { t } = useTranslation()
- const tip = t(($) => $['accessControlDialog.webAppSSONotEnabledTip'], { ns: 'app' })
-
- return (
- <Infotip>
- <InfotipTrigger
- aria-label={tip}
- className="text-text-warning-secondary hover:text-text-warning-secondary"
- iconSize="large"
- />
- <InfotipContent aria-label={tip}>{tip}</InfotipContent>
- </Infotip>
- )
-}
diff --git a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
index 3bf82ec748d..ca474fc074d 100644
--- a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
+++ b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
@@ -54,6 +54,8 @@ const AdvancedPromptInput: FC<Props> = ({
onHideContextMissingTip,
noResize,
}) => {
+ const promptLabelId = React.useId()
+
const { t } = useTranslation()
const { eventEmitter } = useEventEmitterContextContext()
@@ -186,18 +188,12 @@ const AdvancedPromptInput: FC<Props> = ({
<MessageTypeSelector value={type} onChange={onTypeChange} />
) : (
<div className="flex items-center space-x-1">
- <div className="text-sm font-semibold text-indigo-800 uppercase">
+ <div id={promptLabelId} className="text-sm font-semibold text-indigo-800 uppercase">
{t(($) => $['pageTitle.line1'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $.promptTip, { ns: 'appDebug' })}
- className="ml-1"
- />
- <InfotipContent
- aria-label={t(($) => $.promptTip, { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={promptLabelId} className="ml-1" />
+ <InfotipContent aria-labelledby={promptLabelId} className="w-45">
{t(($) => $.promptTip, { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
index a058493c3a5..1c21cdd57b7 100644
--- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
+++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
@@ -207,14 +207,8 @@ const Prompt: FC<ISimplePromptInput> = ({
</h2>
{!readonly && (
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $.promptTip, { ns: 'appDebug' })}
- className="ml-1"
- />
- <InfotipContent
- aria-label={t(($) => $.promptTip, { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} className="ml-1" />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $.promptTip, { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx
index 6d4ca7aedf7..6724f9c3cc7 100644
--- a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx
+++ b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx
@@ -233,7 +233,7 @@ describe('ConfigModalFormFields', () => {
const textInputProps = createBaseProps()
const textInputView = render(<ConfigModalFormFields {...textInputProps} />)
expect(screen.getByText('variableConfig.hidden')).toBeInTheDocument()
- fireEvent.click(screen.getByRole('button', { name: 'variableConfig.hiddenDescription' }))
+ fireEvent.click(screen.getByRole('button', { name: 'variableConfig.hidden' }))
expect(await screen.findByText('variableConfig.hiddenDescription')).toBeInTheDocument()
const docLink = await screen.findByRole('link')
expect(docLink).toHaveAttribute(
diff --git a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
index 613130f08d3..bd9edb47fc9 100644
--- a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
+++ b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
@@ -81,6 +81,8 @@ const ConfigModalFormFields: FC<ConfigModalFormFieldsProps> = ({
validationError,
t: rawTranslate,
}) => {
+ const hiddenLabelId = React.useId()
+
const fileInputTypes: readonly InputVarType[] = [InputVarType.singleFile, InputVarType.multiFiles]
const t = getStringSelectorTranslate(rawTranslate)
@@ -100,9 +102,6 @@ const ConfigModalFormFields: FC<ConfigModalFormFieldsProps> = ({
'aria-invalid': !!getError(field) || undefined,
'aria-describedby': getError(field) ? errorId : undefined,
})
- const hiddenDescriptionAriaLabel = t(($) => $['variableConfig.hiddenDescription'], {
- ns: 'appDebug',
- }).replace(/<[^>]+>/g, '')
return (
<div className="space-y-2">
@@ -406,14 +405,14 @@ const ConfigModalFormFields: FC<ConfigModalFormFieldsProps> = ({
disabled={tempPayload.required}
onCheckedChange={(checked) => onPayloadChange('hide')(checked)}
/>
- <span className="system-sm-semibold text-text-secondary">
+ <span id={hiddenLabelId} className="system-sm-semibold text-text-secondary">
{t(($) => $['variableConfig.hidden'], { ns: 'appDebug' })}
</span>
</label>
<div className="flex items-center gap-1">
<Infotip>
- <InfotipTrigger aria-label={hiddenDescriptionAriaLabel} />
- <InfotipContent aria-label={hiddenDescriptionAriaLabel}>
+ <InfotipTrigger aria-labelledby={hiddenLabelId} />
+ <InfotipContent aria-labelledby={hiddenLabelId}>
<Trans
i18nKey={($) => $['variableConfig.hiddenDescription']}
ns="appDebug"
diff --git a/web/app/components/app/configuration/config-var/index.tsx b/web/app/components/app/configuration/config-var/index.tsx
index 85bef7ede12..80128730acb 100644
--- a/web/app/components/app/configuration/config-var/index.tsx
+++ b/web/app/components/app/configuration/config-var/index.tsx
@@ -94,6 +94,8 @@ export type IConfigVarProps = {
}
const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVariablesChange }) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const { mode, dataSets } = useContext(ConfigContext)
const { eventEmitter } = useEventEmitterContextContext()
@@ -313,14 +315,13 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
className="mt-2"
title={
<div className="flex items-center">
- <h2 className="mr-1">{t(($) => $.variableTitle, { ns: 'appDebug' })}</h2>
+ <h2 id={titleId} className="mr-1">
+ {t(($) => $.variableTitle, { ns: 'appDebug' })}
+ </h2>
{!readonly && (
<Infotip>
- <InfotipTrigger aria-label={t(($) => $.variableTip, { ns: 'appDebug' })} />
- <InfotipContent
- aria-label={t(($) => $.variableTip, { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $.variableTip, { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/config-vision/index.tsx b/web/app/components/app/configuration/config-vision/index.tsx
index d683de10ab9..97252c4fb74 100644
--- a/web/app/components/app/configuration/config-vision/index.tsx
+++ b/web/app/components/app/configuration/config-vision/index.tsx
@@ -19,6 +19,8 @@ import { Resolution } from '@/types/app'
import ParamConfig from './param-config'
const ConfigVision: FC = () => {
+ const resolutionLabelId = React.useId()
+
const { t } = useTranslation()
const titleId = useId()
const { isShowVisionConfig, isAllowVideoUpload, readonly } = useContext(ConfigContext)
@@ -78,11 +80,8 @@ const ConfigVision: FC = () => {
{t(($) => $['vision.name'], { ns: 'appDebug' })}
</h2>
<Infotip>
- <InfotipTrigger aria-label={t(($) => $['vision.description'], { ns: 'appDebug' })} />
- <InfotipContent
- aria-label={t(($) => $['vision.description'], { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $['vision.description'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
@@ -91,19 +90,13 @@ const ConfigVision: FC = () => {
{readonly ? (
<>
<div className="mr-2 flex items-center gap-0.5">
- <div className="system-xs-medium-uppercase text-text-tertiary">
+ <div id={resolutionLabelId} className="system-xs-medium-uppercase text-text-tertiary">
{t(($) => $['vision.visionSettings.resolution'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['vision.visionSettings.resolutionTooltip'], {
- ns: 'appDebug',
- })}
- />
+ <InfotipTrigger aria-labelledby={resolutionLabelId} />
<InfotipContent
- aria-label={t(($) => $['vision.visionSettings.resolutionTooltip'], {
- ns: 'appDebug',
- })}
+ aria-labelledby={resolutionLabelId}
className="w-45 whitespace-pre-wrap"
>
{t(($) => $['vision.visionSettings.resolutionTooltip'], { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config-vision/param-config-content.tsx b/web/app/components/app/configuration/config-vision/param-config-content.tsx
index cdf30e81056..aac797b0b8b 100644
--- a/web/app/components/app/configuration/config-vision/param-config-content.tsx
+++ b/web/app/components/app/configuration/config-vision/param-config-content.tsx
@@ -18,6 +18,8 @@ const MAX = 6
const optionClassName =
'flex h-8 w-full cursor-default items-center justify-center rounded-md border border-components-option-card-option-border bg-components-option-card-option-bg px-2 system-sm-regular text-text-secondary data-unchecked:cursor-pointer data-unchecked:hover:border-components-option-card-option-border-hover data-unchecked:hover:bg-components-option-card-option-bg-hover data-unchecked:hover:shadow-xs focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:outline-hidden data-checked:border-[1.5px] data-checked:border-components-option-card-option-selected-border data-checked:bg-components-option-card-option-selected-bg data-checked:system-sm-medium data-checked:shadow-xs'
const ParamConfigContent: FC = () => {
+ const resolutionLabelId = React.useId()
+
const { t } = useTranslation()
const file = useFeatures((s) => s.features.file)
const featuresStore = useFeaturesStore()
@@ -67,19 +69,16 @@ const ParamConfigContent: FC = () => {
}
>
<div className="mb-2 flex items-center space-x-1">
- <FieldsetLegend className="m-0 py-0 text-[13px] leading-4.5 font-semibold text-text-secondary">
+ <FieldsetLegend
+ id={resolutionLabelId}
+ className="m-0 py-0 text-[13px] leading-4.5 font-semibold text-text-secondary"
+ >
{t(($) => $['vision.visionSettings.resolution'], { ns: 'appDebug' })}
</FieldsetLegend>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['vision.visionSettings.resolutionTooltip'], {
- ns: 'appDebug',
- })}
- />
+ <InfotipTrigger aria-labelledby={resolutionLabelId} />
<InfotipContent
- aria-label={t(($) => $['vision.visionSettings.resolutionTooltip'], {
- ns: 'appDebug',
- })}
+ aria-labelledby={resolutionLabelId}
className="w-45 whitespace-pre-wrap"
>
{t(($) => $['vision.visionSettings.resolutionTooltip'], { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx b/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
index b770335789f..0fa53af5198 100644
--- a/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
+++ b/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
@@ -13,6 +13,8 @@ type Props = Readonly<{
}>
const ItemPanel: FC<Props> = ({ className, icon, name, description, children }) => {
+ const titleId = React.useId()
+
return (
<div
className={cn(
@@ -22,10 +24,12 @@ const ItemPanel: FC<Props> = ({ className, icon, name, description, children })
>
<div className="flex items-center">
{icon}
- <div className="mr-1 ml-3 text-sm/6 font-semibold text-text-secondary">{name}</div>
+ <div id={titleId} className="mr-1 ml-3 text-sm/6 font-semibold text-text-secondary">
+ {name}
+ </div>
<Infotip>
- <InfotipTrigger aria-label={description} />
- <InfotipContent aria-label={description} className="w-45">
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{description}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
index 83c44b216f3..5873bb48ebb 100644
--- a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
+++ b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
@@ -42,6 +42,9 @@ import SettingBuiltInTool from './setting-built-in-tool'
type AgentToolWithMoreInfo = (AgentTool & { icon: any; collection?: Collection }) | null
const AgentTools: FC = () => {
+ const toolNameLabelId = React.useId()
+ const toolsLabelId = React.useId()
+
const { t } = useTranslation()
const [isShowChooseTool, setIsShowChooseTool] = useState(false)
const { readonly, modelConfig, setModelConfig } = useContext(ConfigContext)
@@ -160,14 +163,12 @@ const AgentTools: FC = () => {
noBodySpacing={tools.length === 0}
title={
<div className="flex items-center">
- <h2 className="mr-1">{t(($) => $['agent.tools.name'], { ns: 'appDebug' })}</h2>
+ <h2 id={toolsLabelId} className="mr-1">
+ {t(($) => $['agent.tools.name'], { ns: 'appDebug' })}
+ </h2>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['agent.tools.description'], { ns: 'appDebug' })}
- />
- <InfotipContent
- aria-label={t(($) => $['agent.tools.description'], { ns: 'appDebug' })}
- >
+ <InfotipTrigger aria-labelledby={toolsLabelId} />
+ <InfotipContent aria-labelledby={toolsLabelId}>
{t(($) => $['agent.tools.description'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
@@ -251,8 +252,13 @@ const AgentTools: FC = () => {
aria-label={item.tool_name}
className="ml-0.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100"
/>
- <InfotipContent aria-label={item.tool_name} className="w-55">
- <div className="mb-1.5">{item.tool_name}</div>
+ <InfotipContent
+ aria-labelledby={`${toolNameLabelId}-${index}`}
+ className="w-55"
+ >
+ <div id={`${toolNameLabelId}-${index}`} className="mb-1.5">
+ {item.tool_name}
+ </div>
<div className="mb-1.5 text-text-tertiary">
{t(($) => $.toolNameUsageTip, { ns: 'tools' })}
</div>
diff --git a/web/app/components/app/configuration/config/config-audio.tsx b/web/app/components/app/configuration/config/config-audio.tsx
index 0be0bb440c3..45930d20e73 100644
--- a/web/app/components/app/configuration/config/config-audio.tsx
+++ b/web/app/components/app/configuration/config/config-audio.tsx
@@ -12,6 +12,8 @@ import { SupportUploadFileTypes } from '@/app/components/workflow/types'
import ConfigContext from '@/context/debug-configuration'
const ConfigAudio: FC = () => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const file = useFeatures((s) => s.features.file)
const featuresStore = useFeaturesStore()
@@ -53,17 +55,12 @@ const ConfigAudio: FC = () => {
</div>
</div>
<div className="flex grow items-center">
- <div className="mr-1 system-sm-semibold text-text-secondary">
+ <div id={titleId} className="mr-1 system-sm-semibold text-text-secondary">
{t(($) => $['feature.audioUpload.title'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['feature.audioUpload.description'], { ns: 'appDebug' })}
- />
- <InfotipContent
- aria-label={t(($) => $['feature.audioUpload.description'], { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $['feature.audioUpload.description'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/config/config-document.tsx b/web/app/components/app/configuration/config/config-document.tsx
index a35cb8687fe..5de58ed13b1 100644
--- a/web/app/components/app/configuration/config/config-document.tsx
+++ b/web/app/components/app/configuration/config/config-document.tsx
@@ -12,6 +12,8 @@ import { SupportUploadFileTypes } from '@/app/components/workflow/types'
import ConfigContext from '@/context/debug-configuration'
const ConfigDocument: FC = () => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const file = useFeatures((s) => s.features.file)
const featuresStore = useFeaturesStore()
@@ -54,17 +56,12 @@ const ConfigDocument: FC = () => {
</div>
</div>
<div className="flex grow items-center">
- <div className="mr-1 system-sm-semibold text-text-secondary">
+ <div id={titleId} className="mr-1 system-sm-semibold text-text-secondary">
{t(($) => $['feature.documentUpload.title'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['feature.documentUpload.description'], { ns: 'appDebug' })}
- />
- <InfotipContent
- aria-label={t(($) => $['feature.documentUpload.description'], { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $['feature.documentUpload.description'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/dataset-config/context-var/index.tsx b/web/app/components/app/configuration/dataset-config/context-var/index.tsx
index 8d40908ad32..bf7ef00b25e 100644
--- a/web/app/components/app/configuration/dataset-config/context-var/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/context-var/index.tsx
@@ -8,6 +8,8 @@ import { useTranslation } from 'react-i18next'
import VarPicker from './var-picker'
const ContextVar: FC<Props> = (props) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const { value, options } = props
const currItem = options.find((item) => item.value === value)
@@ -28,17 +30,12 @@ const ContextVar: FC<Props> = (props) => {
className="i-custom-vender-line-development-brackets-x size-4 text-text-accent"
/>
</div>
- <div className="mr-1 text-sm font-medium text-text-secondary">
+ <div id={titleId} className="mr-1 text-sm font-medium text-text-secondary">
{t(($) => $['feature.dataSet.queryVariable.title'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['feature.dataSet.queryVariable.tip'], { ns: 'appDebug' })}
- />
- <InfotipContent
- aria-label={t(($) => $['feature.dataSet.queryVariable.tip'], { ns: 'appDebug' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-45">
{t(($) => $['feature.dataSet.queryVariable.tip'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
index da7b45590dc..f7456840a1a 100644
--- a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
+++ b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
@@ -9,7 +9,7 @@ import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { Separator } from '@langgenius/dify-ui/separator'
import { Switch } from '@langgenius/dify-ui/switch'
-import { memo, useCallback, useEffect, useMemo } from 'react'
+import { memo, useCallback, useEffect, useId, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from '@/app/components/app/configuration/toast'
import ScoreThresholdItem from '@/app/components/base/param-item/score-threshold-item'
@@ -48,6 +48,10 @@ const ConfigContent: FC<Props> = ({
onSingleRetrievalModelParamsChange = noopParamsChange,
selectedDatasets = [],
}) => {
+ const reasoningLabelId = useId()
+ const rerankLabelId = useId()
+ const rerankOptionLabelId = useId()
+
const { t } = useTranslation()
const selectedDatasetsMode = useSelectedDatasetsMode(selectedDatasets)
const type = datasetConfigs.retrieval_model
@@ -243,10 +247,18 @@ const ConfigContent: FC<Props> = ({
)}
onClick={() => handleRerankModeChange(option.value)}
>
- <div className="truncate">{option.label}</div>
+ <div id={`${rerankOptionLabelId}-${option.value}`} className="truncate">
+ {option.label}
+ </div>
<Infotip>
- <InfotipTrigger aria-label={option.tips} className="ml-0.5 size-3.5" />
- <InfotipContent aria-label={option.tips} className="w-50">
+ <InfotipTrigger
+ aria-labelledby={`${rerankOptionLabelId}-${option.value}`}
+ className="ml-0.5 size-3.5"
+ />
+ <InfotipContent
+ aria-labelledby={`${rerankOptionLabelId}-${option.value}`}
+ className="w-50"
+ >
{option.tips}
</InfotipContent>
</Infotip>
@@ -264,18 +276,15 @@ const ConfigContent: FC<Props> = ({
onCheckedChange={handleManuallyToggleRerank}
/>
)}
- <div className="ml-1 system-sm-semibold leading-8 text-text-secondary">
+ <div
+ id={rerankLabelId}
+ className="ml-1 system-sm-semibold leading-8 text-text-secondary"
+ >
{t(($) => $['modelProvider.rerankModel.key'], { ns: 'common' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
- className="ml-1"
- />
- <InfotipContent
- aria-label={t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
- className="w-50"
- >
+ <InfotipTrigger aria-labelledby={rerankLabelId} className="ml-1" />
+ <InfotipContent aria-labelledby={rerankLabelId} className="w-50">
{t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
</InfotipContent>
</Infotip>
@@ -345,16 +354,15 @@ const ConfigContent: FC<Props> = ({
{isInWorkflow && type === RETRIEVE_TYPE.oneWay && (
<div className="mt-4">
<div className="flex items-center space-x-0.5">
- <div className="text-[13px] leading-8 font-medium text-text-primary">
+ <div
+ id={reasoningLabelId}
+ className="text-[13px] leading-8 font-medium text-text-primary"
+ >
{t(($) => $['modelProvider.systemReasoningModel.key'], { ns: 'common' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['modelProvider.systemReasoningModel.tip'], { ns: 'common' })}
- />
- <InfotipContent
- aria-label={t(($) => $['modelProvider.systemReasoningModel.tip'], { ns: 'common' })}
- >
+ <InfotipTrigger aria-labelledby={reasoningLabelId} />
+ <InfotipContent aria-labelledby={reasoningLabelId}>
{t(($) => $['modelProvider.systemReasoningModel.tip'], { ns: 'common' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/app/overview/app-chart.tsx b/web/app/components/app/overview/app-chart.tsx
index eb5af4659ea..d4ce69c2193 100644
--- a/web/app/components/app/overview/app-chart.tsx
+++ b/web/app/components/app/overview/app-chart.tsx
@@ -68,6 +68,8 @@ const Chart: React.FC<IChartProps> = ({
yMax,
className,
}) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const statistics = chartData.data
const yField = getChartValueField(statistics, valueKey)
@@ -96,6 +98,7 @@ const Chart: React.FC<IChartProps> = ({
<div className="flex h-11 shrink-0 items-center px-6 pt-6 pb-1">
<div className="flex min-w-0 items-center">
<div
+ id={titleId}
className="min-w-0 truncate system-sm-semibold-uppercase text-text-secondary"
title={title}
>
@@ -103,8 +106,8 @@ const Chart: React.FC<IChartProps> = ({
</div>
{explanation && (
<Infotip>
- <InfotipTrigger aria-label={explanation} className="ml-1" />
- <InfotipContent aria-label={explanation} className="w-60">
+ <InfotipTrigger aria-labelledby={titleId} className="ml-1" />
+ <InfotipContent aria-labelledby={titleId} className="w-60">
{explanation}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx
index 1df89f887e3..1b645c65b63 100644
--- a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx
+++ b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx
@@ -1006,7 +1006,6 @@ describe('ChatInputArea', () => {
const footerNotice = 'Agent runs in a Linux sandbox.'
const footerNoticeTooltip =
'For Dify Community Edition, each of your agents runs in a Linux 7.0.0-10060-aws sandbox environment within your docker. Your edits to the environment via Build Chats are persistent.'
- const accessibleName = `common.operation.learnMore: ${footerNotice}`
render(
<ChatInputArea
visionConfig={mockVisionConfig}
@@ -1018,9 +1017,10 @@ describe('ChatInputArea', () => {
expect(screen.getByText(footerNotice)).toBeInTheDocument()
expect(screen.queryByText(footerNoticeTooltip)).not.toBeInTheDocument()
- await user.click(screen.getByRole('button', { name: accessibleName }))
+ await user.click(screen.getByRole('button', { name: footerNotice }))
- expect(await screen.findByText(footerNoticeTooltip)).toBeInTheDocument()
+ const dialog = await screen.findByRole('dialog', { name: footerNotice })
+ expect(dialog).toHaveTextContent(footerNoticeTooltip)
})
it('should render feature bar when showFeatureBar is true', () => {
diff --git a/web/app/components/base/chat/chat/chat-input-area/index.tsx b/web/app/components/base/chat/chat/chat-input-area/index.tsx
index 62314df5db5..240fb7b5ae3 100644
--- a/web/app/components/base/chat/chat/chat-input-area/index.tsx
+++ b/web/app/components/base/chat/chat/chat-input-area/index.tsx
@@ -8,7 +8,7 @@ import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { noop } from 'es-toolkit/function'
import { decode } from 'html-entities'
-import { useCallback, useRef, useState } from 'react'
+import { useCallback, useId, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Textarea from 'react-textarea-autosize'
import FeatureBar from '@/app/components/base/features/new-feature-panel/feature-bar'
@@ -86,6 +86,8 @@ const ChatInputArea = ({
autoFocus = true,
sendOnEnter = true,
}: ChatInputAreaProps) => {
+ const footerNoticeLabelId = useId()
+
const { t } = useTranslation()
const {
wrapperRef,
@@ -295,10 +297,6 @@ const ChatInputArea = ({
const shouldShowFooterNotice = footerNotice !== undefined && footerNotice !== null
const shouldShowFooterNoticeTooltip =
footerNoticeTooltip !== undefined && footerNoticeTooltip !== null
- const footerNoticeText = typeof footerNotice === 'string' ? footerNotice.trim() : ''
- const footerNoticeAriaLabel = footerNoticeText
- ? `${t(($) => $['operation.learnMore'], { ns: 'common' })}: ${footerNoticeText}`
- : t(($) => $['operation.learnMore'], { ns: 'common' })
return (
<>
<div
@@ -377,15 +375,20 @@ const ChatInputArea = ({
{shouldShowFooterNotice && (
<div className="m-1 mt-0 -translate-y-2 rounded-b-[10px] border-r border-b border-l border-components-panel-border-subtle bg-util-colors-indigo-indigo-50 px-2.5 py-2 pt-4">
<div className="flex items-center gap-1">
- <div className="min-w-0 flex-1 body-xs-medium text-text-accent">{footerNotice}</div>
+ <div
+ id={footerNoticeLabelId}
+ className="min-w-0 flex-1 body-xs-medium text-text-accent"
+ >
+ {footerNotice}
+ </div>
{shouldShowFooterNoticeTooltip && (
<Infotip>
<InfotipTrigger
- aria-label={footerNoticeAriaLabel}
+ aria-labelledby={footerNoticeLabelId}
className="ml-auto size-5 rounded-md text-text-accent hover:bg-state-base-hover hover:text-text-accent"
iconVariant="information"
/>
- <InfotipContent aria-label={footerNoticeAriaLabel} className="max-w-80">
+ <InfotipContent aria-labelledby={footerNoticeLabelId} className="max-w-80">
{footerNoticeTooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx
index 06dfaea9dad..d6ecff0bd90 100644
--- a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx
+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx
@@ -8,13 +8,17 @@ export const Item: FC<{ title: string; tooltip: string; children: React.JSX.Elem
tooltip,
children,
}) => {
+ const titleId = React.useId()
+
return (
<div>
<div className="mb-1 flex items-center space-x-1">
- <div className="py-1 system-sm-semibold text-text-secondary">{title}</div>
+ <div id={titleId} className="py-1 system-sm-semibold text-text-secondary">
+ {title}
+ </div>
<Infotip>
- <InfotipTrigger aria-label={tooltip} />
- <InfotipContent aria-label={tooltip} className="max-w-50">
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="max-w-50">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx
index 0faf34ccce2..1a4a7e8245f 100644
--- a/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx
+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx
@@ -288,7 +288,7 @@ describe('OpeningSettingModal', () => {
expect(screen.getByTestId('opener-questions-section')).toBeInTheDocument()
expect(screen.getByText(/openingStatement\.editorTitle/)).toBeInTheDocument()
expect(
- screen.getByRole('button', { name: /openingStatement\.openingQuestionDescription/ }),
+ screen.getByRole('button', { name: /openingStatement\.openingQuestion/ }),
).toBeInTheDocument()
expect(
screen.queryByText(/openingStatement\.openingQuestionDescription/),
@@ -298,9 +298,7 @@ describe('OpeningSettingModal', () => {
it('should show the opening questions description in an infotip', async () => {
await render(<OpeningSettingModal data={defaultData} onSave={vi.fn()} onCancel={vi.fn()} />)
- await userEvent.hover(
- screen.getByRole('button', { name: /openingStatement\.openingQuestionDescription/ }),
- )
+ await userEvent.hover(screen.getByRole('button', { name: /openingStatement\.openingQuestion/ }))
expect(
await screen.findByText(/openingStatement\.openingQuestionDescription/),
diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
index 4a6b2fdd24c..4d4bc4846cc 100644
--- a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
@@ -38,6 +38,8 @@ const OpeningSettingModal = ({
workflowVariables = [],
onAutoAddPromptVariable,
}: OpeningSettingModalProps) => {
+ const questionsLabelId = React.useId()
+
const { t } = useTranslation()
const [tempValue, setTempValue] = useState(data?.opening_statement || '')
useEffect(() => {
@@ -144,22 +146,12 @@ const OpeningSettingModal = ({
<div>
<div className="mb-3 flex items-center justify-between">
<div className="flex items-center gap-1">
- <div className="text-sm font-medium text-text-primary">
+ <div id={questionsLabelId} className="text-sm font-medium text-text-primary">
{t(($) => $['openingStatement.openingQuestion'], { ns: 'appDebug' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['openingStatement.openingQuestionDescription'], {
- ns: 'appDebug',
- })}
- className="size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $['openingStatement.openingQuestionDescription'], {
- ns: 'appDebug',
- })}
- className="max-w-55"
- >
+ <InfotipTrigger aria-labelledby={questionsLabelId} className="size-3.5" />
+ <InfotipContent aria-labelledby={questionsLabelId} className="max-w-55">
{t(($) => $['openingStatement.openingQuestionDescription'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/features/new-feature-panel/feature-card.tsx b/web/app/components/base/features/new-feature-panel/feature-card.tsx
index 8ab0bb2ef55..24b178531a6 100644
--- a/web/app/components/base/features/new-feature-panel/feature-card.tsx
+++ b/web/app/components/base/features/new-feature-panel/feature-card.tsx
@@ -41,13 +41,8 @@ const FeatureCard = ({
<span id={titleId}>{title}</span>
{!!tooltip && (
<Infotip>
- <InfotipTrigger
- aria-label={typeof tooltip === 'string' ? tooltip : String(title)}
- className="ml-0.5 size-3.5"
- />
- <InfotipContent aria-label={typeof tooltip === 'string' ? tooltip : String(title)}>
- {tooltip}
- </InfotipContent>
+ <InfotipTrigger aria-labelledby={titleId} className="ml-0.5 size-3.5" />
+ <InfotipContent aria-labelledby={titleId}>{tooltip}</InfotipContent>
</Infotip>
)}
</div>
diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsx
index 76938c29f1a..9d8a8e019e7 100644
--- a/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsx
+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsx
@@ -142,7 +142,7 @@ describe('ParamConfigContent', () => {
const languageLabel = screen.getByText(/voice\.voiceSettings\.language/)
expect(languageLabel)!.toBeInTheDocument()
expect(
- screen.getByRole('button', { name: /voice\.voiceSettings\.resolutionTooltip/ }),
+ screen.getByRole('button', { name: /voice\.voiceSettings\.language/ }),
)!.toBeInTheDocument()
})
diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx
index 2284ccf7e71..b0e69c1d54d 100644
--- a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx
+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx
@@ -16,6 +16,7 @@ import {
import { Switch } from '@langgenius/dify-ui/switch'
import { skipToken, useQuery } from '@tanstack/react-query'
import { produce } from 'immer'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { replace } from 'string-ts'
import { AudioBtn } from '@/app/components/base/audio-btn'
@@ -35,6 +36,8 @@ type VoiceParamConfigProps = {
onChange?: OnFeaturesChange
}
const VoiceParamConfig = ({ onClose, onChange }: VoiceParamConfigProps) => {
+ const languageLabelId = useId()
+
const { t } = useTranslation()
const params = useParams<{ appId?: string; agentId?: string }>()
const text2speech = useFeatures((state) => state.features.text2speech)
@@ -106,15 +109,12 @@ const VoiceParamConfig = ({ onClose, onChange }: VoiceParamConfigProps) => {
</div>
<div className="mb-3">
<div className="mb-1 flex items-center py-1 system-sm-semibold text-text-secondary">
- {t(($) => $['voice.voiceSettings.language'], { ns: 'appDebug' })}
+ <span id={languageLabelId}>
+ {t(($) => $['voice.voiceSettings.language'], { ns: 'appDebug' })}
+ </span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['voice.voiceSettings.resolutionTooltip'], { ns: 'appDebug' })}
- />
- <InfotipContent
- aria-label={t(($) => $['voice.voiceSettings.resolutionTooltip'], { ns: 'appDebug' })}
- className="w-45 whitespace-pre-wrap"
- >
+ <InfotipTrigger aria-labelledby={languageLabelId} />
+ <InfotipContent aria-labelledby={languageLabelId} className="w-45 whitespace-pre-wrap">
{t(($) => $['voice.voiceSettings.resolutionTooltip'], { ns: 'appDebug' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/form/components/__tests__/label.spec.tsx b/web/app/components/base/form/components/__tests__/label.spec.tsx
index 99471e5171b..4b5e1d2728b 100644
--- a/web/app/components/base/form/components/__tests__/label.spec.tsx
+++ b/web/app/components/base/form/components/__tests__/label.spec.tsx
@@ -41,7 +41,7 @@ describe('Label', () => {
const tooltipText = 'Test Tooltip'
render(<Label {...defaultProps} tooltip={tooltipText} />)
- await user.hover(screen.getByRole('button', { name: tooltipText }))
+ await user.hover(screen.getByRole('button', { name: 'Test Label' }))
expect(await screen.findByText(tooltipText)).toBeInTheDocument()
})
diff --git a/web/app/components/base/form/components/base/__tests__/base-field.spec.tsx b/web/app/components/base/form/components/base/__tests__/base-field.spec.tsx
index 8163736c76a..b19b828a99d 100644
--- a/web/app/components/base/form/components/base/__tests__/base-field.spec.tsx
+++ b/web/app/components/base/form/components/base/__tests__/base-field.spec.tsx
@@ -166,7 +166,7 @@ describe('BaseField', () => {
)
expect(control).toBeInvalid()
expect(control).toBeRequired()
- expect(screen.getByRole('button', { name: 'Credential help' })).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Credential' })).toBeInTheDocument()
await user.click(screen.getByText('Credential'))
expect(control).toHaveFocus()
expect(control).toHaveAttribute('aria-expanded', 'false')
@@ -527,7 +527,7 @@ describe('BaseField', () => {
expect(screen.getByText('Info')).toBeInTheDocument()
- await user.click(screen.getByRole('button', { name: 'Extra info' }))
+ await user.click(screen.getByRole('button', { name: 'Info' }))
expect(screen.getByText('Extra info')).toBeInTheDocument()
})
diff --git a/web/app/components/base/form/components/base/__tests__/validation-accessibility.spec.tsx b/web/app/components/base/form/components/base/__tests__/validation-accessibility.spec.tsx
index 5a54a364b65..7ab15a9b325 100644
--- a/web/app/components/base/form/components/base/__tests__/validation-accessibility.spec.tsx
+++ b/web/app/components/base/form/components/base/__tests__/validation-accessibility.spec.tsx
@@ -44,7 +44,7 @@ describe('BaseForm validation accessibility', () => {
</button>
</>,
)
- const input = screen.getByLabelText('API token')
+ const input = screen.getByLabelText('API token', { selector: 'input' })
await user.type(input, 'rejected-token')
act(() => {
ref.current?.setFields([{ name: 'token', errors: ['Token was rejected'] }])
@@ -77,13 +77,13 @@ describe('BaseForm validation accessibility', () => {
</button>
</>,
)
- const input = screen.getByLabelText('API token')
+ const input = screen.getByLabelText('API token', { selector: 'input' })
expect(input).not.toBeInvalid()
await user.click(screen.getByRole('button', { name: 'Save credentials' }))
expect(input).toHaveFocus()
expect(input).toBeInvalid()
expect(input).toHaveAccessibleDescription('Paste your API token Token is required')
- expect(screen.getByLabelText('Other token')).not.toBeInvalid()
+ expect(screen.getByLabelText('Other token', { selector: 'input' })).not.toBeInvalid()
await user.type(input, 'valid-token')
expect(input).not.toBeInvalid()
@@ -115,7 +115,7 @@ describe('BaseForm validation accessibility', () => {
</>,
)
await user.click(screen.getByRole('button', { name: 'Save credentials' }))
- expect(screen.getByLabelText('Visible token')).toHaveFocus()
- expect(screen.queryByLabelText('Hidden token')).not.toBeInTheDocument()
+ expect(screen.getByLabelText('Visible token', { selector: 'input' })).toHaveFocus()
+ expect(screen.queryByLabelText('Hidden token', { selector: 'input' })).not.toBeInTheDocument()
})
})
diff --git a/web/app/components/base/form/components/base/base-field.tsx b/web/app/components/base/form/components/base/base-field.tsx
index 66b86fc2488..eabe33a66f4 100644
--- a/web/app/components/base/form/components/base/base-field.tsx
+++ b/web/app/components/base/form/components/base/base-field.tsx
@@ -295,7 +295,7 @@ const BaseField = ({
<div className={cn(labelClassName, formLabelClassName)}>
{isSelect ? (
<SelectLabel className="inline p-0 text-inherit [font:inherit]">
- {translatedLabel || name}
+ <span id={labelId}>{translatedLabel || name}</span>
</SelectLabel>
) : isSingleControl ? (
<label
@@ -315,8 +315,8 @@ const BaseField = ({
)}
{translatedTooltip && (
<Infotip>
- <InfotipTrigger aria-label={translatedTooltip} className="ml-0.5" />
- <InfotipContent aria-label={translatedTooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{translatedTooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/form/components/field/upload-method.tsx b/web/app/components/base/form/components/field/upload-method.tsx
index 6556c4ed99c..e57cd7ec080 100644
--- a/web/app/components/base/form/components/field/upload-method.tsx
+++ b/web/app/components/base/form/components/field/upload-method.tsx
@@ -4,7 +4,7 @@ import { Field, FieldItem, FieldLabel } from '@langgenius/dify-ui/field'
import { Fieldset, FieldsetLegend } from '@langgenius/dify-ui/fieldset'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { RadioGroup, RadioItem } from '@langgenius/dify-ui/radio-group'
-import { useCallback } from 'react'
+import { useCallback, useId } from 'react'
import { useTranslation } from 'react-i18next'
import { TransferMethod } from '@/types/app'
import { useFieldContext } from '../..'
@@ -16,6 +16,8 @@ type UploadMethodFieldProps = {
}
const UploadMethodField = ({ label, labelOptions, className }: UploadMethodFieldProps) => {
+ const labelId = useId()
+
const { t } = useTranslation()
const field = useFieldContext<TransferMethod[]>()
@@ -60,7 +62,7 @@ const UploadMethodField = ({ label, labelOptions, className }: UploadMethodField
}
>
<div className="flex h-6 items-center">
- <FieldsetLegend className={cn('mb-0 py-0', labelOptions?.className)}>
+ <FieldsetLegend id={labelId} className={cn('mb-0 py-0', labelOptions?.className)}>
{label}
</FieldsetLegend>
{!labelOptions?.isRequired && labelOptions?.showOptional && (
@@ -73,8 +75,8 @@ const UploadMethodField = ({ label, labelOptions, className }: UploadMethodField
)}
{labelOptions?.tooltip && (
<Infotip>
- <InfotipTrigger aria-label={labelOptions.tooltip} className="ml-0.5" />
- <InfotipContent aria-label={labelOptions.tooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{labelOptions.tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/form/components/label.tsx b/web/app/components/base/form/components/label.tsx
index 8ddbe0d5248..4bc00c825c8 100644
--- a/web/app/components/base/form/components/label.tsx
+++ b/web/app/components/base/form/components/label.tsx
@@ -1,5 +1,6 @@
import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
export type LabelProps = {
@@ -12,11 +13,17 @@ export type LabelProps = {
}
const Label = ({ htmlFor, label, isRequired, showOptional, tooltip, className }: LabelProps) => {
+ const labelId = useId()
+
const { t } = useTranslation()
return (
<div className="flex h-6 items-center">
- <label htmlFor={htmlFor} className={cn('system-sm-medium text-text-secondary', className)}>
+ <label
+ id={labelId}
+ htmlFor={htmlFor}
+ className={cn('system-sm-medium text-text-secondary', className)}
+ >
{label}
</label>
{!isRequired && showOptional && (
@@ -29,8 +36,8 @@ const Label = ({ htmlFor, label, isRequired, showOptional, tooltip, className }:
)}
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} className="ml-0.5" />
- <InfotipContent aria-label={tooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/base/param-item/__tests__/index.spec.tsx b/web/app/components/base/param-item/__tests__/index.spec.tsx
index 31c2c69fb4a..b2b37e4be4b 100644
--- a/web/app/components/base/param-item/__tests__/index.spec.tsx
+++ b/web/app/components/base/param-item/__tests__/index.spec.tsx
@@ -32,13 +32,13 @@ describe('ParamItem', () => {
it('should render a tooltip trigger by default', () => {
render(<ParamItem {...defaultProps} tip="Some tip text" />)
- expect(screen.getByLabelText('Some tip text')).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Test Param' })).toBeInTheDocument()
})
it('should not render tooltip trigger when noTooltip is true', () => {
render(<ParamItem {...defaultProps} noTooltip tip="Hidden tip" />)
- expect(screen.queryByLabelText('Hidden tip')).not.toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'Test Param' })).not.toBeInTheDocument()
})
it('should render a switch when hasSwitch is true', () => {
diff --git a/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsx b/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsx
index 72f67031927..90d2e3eb0a4 100644
--- a/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsx
+++ b/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsx
@@ -31,7 +31,9 @@ describe('ScoreThresholdItem', () => {
it('should render tooltip trigger', () => {
render(<ScoreThresholdItem {...defaultProps} />)
- expect(screen.getByLabelText('appDebug.datasetConfig.score_thresholdTip')).toBeInTheDocument()
+ expect(
+ screen.getByRole('button', { name: 'appDebug.datasetConfig.score_threshold' }),
+ ).toBeInTheDocument()
})
it('should render InputNumber and Slider', () => {
diff --git a/web/app/components/base/param-item/__tests__/top-k-item.spec.tsx b/web/app/components/base/param-item/__tests__/top-k-item.spec.tsx
index 6e2402af24d..f87032c44ca 100644
--- a/web/app/components/base/param-item/__tests__/top-k-item.spec.tsx
+++ b/web/app/components/base/param-item/__tests__/top-k-item.spec.tsx
@@ -36,7 +36,9 @@ describe('TopKItem', () => {
it('should render tooltip trigger', () => {
render(<TopKItem {...defaultProps} />)
- expect(screen.getByLabelText('appDebug.datasetConfig.top_kTip')).toBeInTheDocument()
+ expect(
+ screen.getByRole('button', { name: 'appDebug.datasetConfig.top_k' }),
+ ).toBeInTheDocument()
})
it('should render InputNumber and Slider', () => {
diff --git a/web/app/components/base/param-item/index.tsx b/web/app/components/base/param-item/index.tsx
index 97c77abc93f..e7a71c8e44a 100644
--- a/web/app/components/base/param-item/index.tsx
+++ b/web/app/components/base/param-item/index.tsx
@@ -77,8 +77,8 @@ const ParamItem: FC<Props> = ({
</span>
{!noTooltip && tip && (
<Infotip>
- <InfotipTrigger aria-label={tip} />
- <InfotipContent aria-label={tip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/billing/priority-label/index.tsx b/web/app/components/billing/priority-label/index.tsx
index 530b3ff228c..3c1140e6099 100644
--- a/web/app/components/billing/priority-label/index.tsx
+++ b/web/app/components/billing/priority-label/index.tsx
@@ -1,9 +1,8 @@
import { cn } from '@langgenius/dify-ui/cn'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { Infotip, InfotipContent, InfotipTitle, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { RiAedFill } from '@remixicon/react'
import { useQuery } from '@tanstack/react-query'
import { useAtomValue } from 'jotai'
-import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { deploymentEditionAtom } from '@/features/system-features/state'
import { consoleQuery } from '@/service/console'
@@ -14,7 +13,6 @@ type PriorityLabelProps = {
const PriorityLabel = ({ className }: PriorityLabelProps) => {
const { t } = useTranslation()
- const titleId = useId()
const deploymentEdition = useAtomValue(deploymentEditionAtom)
const { data: plan } = useQuery(
consoleQuery.features.get.queryOptions({
@@ -39,11 +37,11 @@ const PriorityLabel = ({ className }: PriorityLabelProps) => {
<InfotipTrigger
aria-label={t(($) => $['plansCommon.documentProcessingPriority'], { ns: 'billing' })}
/>
- <InfotipContent aria-labelledby={titleId}>
- <div id={titleId} className="font-semibold text-text-primary">
+ <InfotipContent>
+ <InfotipTitle className="font-semibold text-text-primary">
{t(($) => $['plansCommon.documentProcessingPriority'], { ns: 'billing' })}:{' '}
{t(($) => $[`plansCommon.priority.${label}`], { ns: 'billing' })}
- </div>
+ </InfotipTitle>
{label !== 'top-priority' && (
<div className="mt-1">
{t(($) => $['plansCommon.documentProcessingPriorityTip'], { ns: 'billing' })}
diff --git a/web/app/components/billing/usage-info/index.tsx b/web/app/components/billing/usage-info/index.tsx
index 294b37b81d5..24d20428eab 100644
--- a/web/app/components/billing/usage-info/index.tsx
+++ b/web/app/components/billing/usage-info/index.tsx
@@ -47,6 +47,8 @@ const UsageInfo: FC<Props> = ({
isSandboxPlan = false,
usageUnknown = false,
}) => {
+ const labelId = React.useId()
+
const { t } = useTranslation()
const isBelowThreshold = !usageUnknown && storageMode && usage < storageThreshold
@@ -167,11 +169,11 @@ const UsageInfo: FC<Props> = ({
)}
<dl className="flex flex-col gap-2">
<dt className="flex items-center gap-1 system-xs-medium text-text-tertiary">
- {name}
+ <span id={labelId}>{name}</span>
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} />
- <InfotipContent aria-label={tooltip} className="w-45">
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="w-45">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx b/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx
index 8f62c6f2725..3cf2b791e78 100644
--- a/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx
+++ b/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx
@@ -780,7 +780,9 @@ describe('RetrievalParamConfig', () => {
/>,
)
- expect(screen.getByLabelText('common.modelProvider.rerankModel.tip'))!.toBeInTheDocument()
+ expect(
+ screen.getByRole('button', { name: 'common.modelProvider.rerankModel.key' }),
+ )!.toBeInTheDocument()
})
})
diff --git a/web/app/components/datasets/common/retrieval-param-config/index.tsx b/web/app/components/datasets/common/retrieval-param-config/index.tsx
index 7e42f8324c8..fe2317f0d07 100644
--- a/web/app/components/datasets/common/retrieval-param-config/index.tsx
+++ b/web/app/components/datasets/common/retrieval-param-config/index.tsx
@@ -130,13 +130,8 @@ const RetrievalParamConfig: FC<Props> = ({
{t(($) => $['modelProvider.rerankModel.key'], { ns: 'common' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
- />
- <InfotipContent
- aria-label={t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
- className="w-50"
- >
+ <InfotipTrigger aria-labelledby={rerankLabelId} />
+ <InfotipContent aria-labelledby={rerankLabelId} className="w-50">
{t(($) => $['modelProvider.rerankModel.tip'], { ns: 'common' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx
index 029a0a6a38b..2037bf31d99 100644
--- a/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx
+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx
@@ -20,6 +20,8 @@ type DetailsProps = {
}
const Details = ({ id, type, onApplyTemplate, onClose }: DetailsProps) => {
+ const structureLabelId = React.useId()
+
const { t } = useTranslation()
const { data: pipelineTemplateInfo } = usePipelineTemplateById(
{
@@ -96,17 +98,15 @@ const Details = ({ id, type, onApplyTemplate, onClose }: DetailsProps) => {
</div>
<div className="flex flex-col gap-y-1 px-4 py-2">
<div className="flex h-6 items-center gap-x-0.5">
- <span className="system-sm-semibold-uppercase text-text-secondary">
+ <span
+ id={structureLabelId}
+ className="system-sm-semibold-uppercase text-text-secondary"
+ >
{t(($) => $['details.structure'], { ns: 'datasetPipeline' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['details.structureTooltip'], { ns: 'datasetPipeline' })}
- />
- <InfotipContent
- aria-label={t(($) => $['details.structureTooltip'], { ns: 'datasetPipeline' })}
- className="max-w-60"
- >
+ <InfotipTrigger aria-labelledby={structureLabelId} />
+ <InfotipContent aria-labelledby={structureLabelId} className="max-w-60">
{t(($) => $['details.structureTooltip'], { ns: 'datasetPipeline' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx b/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx
index bea53501654..0fc59968c49 100644
--- a/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx
+++ b/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx
@@ -11,6 +11,7 @@ import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/inf
import { Separator } from '@langgenius/dify-ui/separator'
import { RiAlertFill, RiSearchEyeLine } from '@remixicon/react'
import { useSuspenseQuery } from '@tanstack/react-query'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import SummaryIndexSetting from '@/app/components/datasets/settings/summary-index-setting'
import { systemFeaturesQueryOptions } from '@/features/system-features/client'
@@ -82,6 +83,8 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
summaryIndexSetting,
onSummaryIndexSettingChange,
}) => {
+ const qaLabelId = useId()
+
const { t } = useTranslation()
const { data: deploymentEdition } = useSuspenseQuery({
...systemFeaturesQueryOptions(),
@@ -180,7 +183,7 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
else onDocFormChange(ChunkingMode.qa)
}}
/>
- <span className="ml-2 system-sm-regular text-text-secondary">
+ <span id={qaLabelId} className="ml-2 system-sm-regular text-text-secondary">
{t(($) => $['stepTwo.useQALanguage'], { ns: 'datasetCreation' })}
</span>
</label>
@@ -190,13 +193,8 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
disabled={currentDocForm !== ChunkingMode.qa}
/>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['stepTwo.QATip'], { ns: 'datasetCreation' })}
- className="size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $['stepTwo.QATip'], { ns: 'datasetCreation' })}
- >
+ <InfotipTrigger aria-labelledby={qaLabelId} className="size-3.5" />
+ <InfotipContent aria-labelledby={qaLabelId}>
{t(($) => $['stepTwo.QATip'], { ns: 'datasetCreation' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/create/step-two/components/inputs.tsx b/web/app/components/datasets/create/step-two/components/inputs.tsx
index 5111b7b2872..69b25ebcf52 100644
--- a/web/app/components/datasets/create/step-two/components/inputs.tsx
+++ b/web/app/components/datasets/create/step-two/components/inputs.tsx
@@ -41,6 +41,8 @@ export const DelimiterInput: FC<
onValueChange?: (value: string) => void
}
> = ({ tooltip, onValueChange, value, ...rest }) => {
+ const labelId = useId()
+
const { t } = useTranslation()
const generatedInputId = useId()
const inputId = rest.id ?? generatedInputId
@@ -51,17 +53,12 @@ export const DelimiterInput: FC<
<FormField
label={
<div className="mb-1 flex items-center">
- <label htmlFor={inputId} className="mr-0.5 system-sm-semibold">
+ <label id={labelId} htmlFor={inputId} className="mr-0.5 system-sm-semibold">
{t(($) => $['stepTwo.separator'], { ns: 'datasetCreation' })}
</label>
<Infotip>
- <InfotipTrigger
- aria-label={tooltip || t(($) => $['stepTwo.separatorTip'], { ns: 'datasetCreation' })}
- />
- <InfotipContent
- aria-label={tooltip || t(($) => $['stepTwo.separatorTip'], { ns: 'datasetCreation' })}
- className="max-w-50"
- >
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="max-w-50">
{tooltip || t(($) => $['stepTwo.separatorTip'], { ns: 'datasetCreation' })}
</InfotipContent>
</Infotip>
@@ -183,21 +180,20 @@ export const MaxLengthInput: FC<LabeledCompoundNumberInputProps> = (props) => {
}
export const OverlapInput: FC<LabeledCompoundNumberInputProps> = (props) => {
+ const labelId = useId()
+
const { t } = useTranslation()
const label = t(($) => $['stepTwo.overlap'], { ns: 'datasetCreation' })
return (
<FormField
label={
<div className="mb-1 flex items-center">
- <span className="system-sm-semibold">{label}</span>
+ <span id={labelId} className="system-sm-semibold">
+ {label}
+ </span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['stepTwo.overlapTip'], { ns: 'datasetCreation' })}
- />
- <InfotipContent
- aria-label={t(($) => $['stepTwo.overlapTip'], { ns: 'datasetCreation' })}
- className="max-w-50"
- >
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="max-w-50">
{t(($) => $['stepTwo.overlapTip'], { ns: 'datasetCreation' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/create/website/base/__tests__/checkbox-with-label.spec.tsx b/web/app/components/datasets/create/website/base/__tests__/checkbox-with-label.spec.tsx
index 748cc820c7d..729ded2e6e4 100644
--- a/web/app/components/datasets/create/website/base/__tests__/checkbox-with-label.spec.tsx
+++ b/web/app/components/datasets/create/website/base/__tests__/checkbox-with-label.spec.tsx
@@ -23,12 +23,12 @@ describe('CheckboxWithLabel', () => {
tooltip="Help text"
/>,
)
- expect(screen.getByLabelText('Help text')).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Option' })).toBeInTheDocument()
})
it('should not render tooltip when not provided', () => {
render(<CheckboxWithLabel isChecked={false} onChange={onChange} label="Option" />)
- expect(screen.queryByLabelText('Help text')).not.toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'Option' })).not.toBeInTheDocument()
})
it('should toggle checked state on checkbox click', () => {
diff --git a/web/app/components/datasets/create/website/base/__tests__/field.spec.tsx b/web/app/components/datasets/create/website/base/__tests__/field.spec.tsx
index 6a5f5464e9d..b59be6c916d 100644
--- a/web/app/components/datasets/create/website/base/__tests__/field.spec.tsx
+++ b/web/app/components/datasets/create/website/base/__tests__/field.spec.tsx
@@ -26,7 +26,7 @@ describe('WebsiteField', () => {
it('should render tooltip when provided', () => {
render(<Field label="URL" value="" onChange={onChange} tooltip="Enter full URL" />)
- expect(screen.getByLabelText('Enter full URL')).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'URL' })).toBeInTheDocument()
})
it('should pass value and onChange to Input', () => {
diff --git a/web/app/components/datasets/create/website/base/checkbox-with-label.tsx b/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
index 84ec84beecf..d8c4d33bebc 100644
--- a/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
+++ b/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
@@ -2,6 +2,7 @@
import { Checkbox } from '@langgenius/dify-ui/checkbox'
import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { useId } from 'react'
type Props = Readonly<{
className?: string
@@ -20,11 +21,14 @@ export default function CheckboxWithLabel({
labelClassName,
tooltip,
}: Props) {
+ const labelId = useId()
+
return (
<div className={cn(className, 'flex h-7 items-center')}>
<label className="flex min-w-0 cursor-pointer items-center">
<Checkbox checked={isChecked} onCheckedChange={(checked) => onChange(checked)} />
<span
+ id={labelId}
className={cn(
'ml-2 min-w-0 text-left text-sm font-normal text-text-secondary',
labelClassName,
@@ -36,8 +40,8 @@ export default function CheckboxWithLabel({
<div className="ml-1 flex min-w-0 items-center">
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} />
- <InfotipContent aria-label={tooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/create/website/base/field.tsx b/web/app/components/datasets/create/website/base/field.tsx
index e7af17eaedc..e73406bf511 100644
--- a/web/app/components/datasets/create/website/base/field.tsx
+++ b/web/app/components/datasets/create/website/base/field.tsx
@@ -28,10 +28,13 @@ const Field: FC<Props> = ({
isNumber = false,
tooltip,
}) => {
+ const labelId = React.useId()
+
return (
<div className={cn(className)}>
<div className="flex py-1.75">
<div
+ id={labelId}
className={cn(
labelClassName,
'flex h-4 items-center text-[13px] font-semibold text-text-secondary',
@@ -44,8 +47,8 @@ const Field: FC<Props> = ({
)}
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} className="ml-0.5" />
- <InfotipContent aria-label={tooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/index.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/index.spec.tsx
index fe9d0551c80..5bc75666d52 100644
--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/index.spec.tsx
+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/index.spec.tsx
@@ -62,13 +62,13 @@ describe('CheckboxWithLabel', () => {
it('should render tooltip when provided', () => {
render(<CheckboxWithLabel {...defaultProps} tooltip="Helpful tooltip text" />)
- expect(screen.getByLabelText('Helpful tooltip text'))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Test Label' }))!.toBeInTheDocument()
})
it('should not render tooltip when not provided', () => {
render(<CheckboxWithLabel {...defaultProps} />)
- expect(screen.queryByLabelText('Helpful tooltip text')).not.toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'Test Label' })).not.toBeInTheDocument()
})
})
diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/checkbox-with-label.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/checkbox-with-label.tsx
index bca2ac268d6..e3a7fda0103 100644
--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/checkbox-with-label.tsx
+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/checkbox-with-label.tsx
@@ -2,6 +2,7 @@
import { Checkbox } from '@langgenius/dify-ui/checkbox'
import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { useId } from 'react'
type CheckboxWithLabelProps = {
className?: string
@@ -20,11 +21,14 @@ export default function CheckboxWithLabel({
labelClassName,
tooltip,
}: CheckboxWithLabelProps) {
+ const labelId = useId()
+
return (
<div className={cn('flex items-center', className)}>
<label className="flex min-w-0 cursor-pointer items-center">
<Checkbox checked={isChecked} onCheckedChange={(checked) => onChange(checked)} />
<span
+ id={labelId}
className={cn(
'ml-2 min-w-0 text-left system-sm-medium text-text-secondary',
labelClassName,
@@ -36,8 +40,8 @@ export default function CheckboxWithLabel({
<div className="ml-1 flex min-w-0 items-center">
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} />
- <InfotipContent aria-label={tooltip} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx b/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx
index a955140f274..18511f652c1 100644
--- a/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx
+++ b/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx
@@ -125,12 +125,12 @@ describe('StatusItem', () => {
describe('error message tooltip', () => {
it('should show tooltip trigger when error message is provided', () => {
render(<StatusItem status="error" errorMessage="Test error message" />)
- expect(screen.getByLabelText('Test error message')).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Error' })).toBeInTheDocument()
})
it('should not show tooltip trigger when no error message', () => {
render(<StatusItem status="error" />)
- expect(screen.queryByLabelText('Test error message')).not.toBeInTheDocument()
+ expect(screen.queryByRole('button', { name: 'Error' })).not.toBeInTheDocument()
})
})
diff --git a/web/app/components/datasets/documents/status-item/index.tsx b/web/app/components/datasets/documents/status-item/index.tsx
index 555bbc90285..29ed48a0a27 100644
--- a/web/app/components/datasets/documents/status-item/index.tsx
+++ b/web/app/components/datasets/documents/status-item/index.tsx
@@ -54,6 +54,8 @@ const StatusItem = ({
onUpdate,
canEdit = false,
}: StatusItemProps) => {
+ const statusLabelId = React.useId()
+
const { t } = useTranslation()
const DOC_INDEX_STATUS_MAP = useIndexStatus()
const localStatus = status.toLowerCase() as keyof typeof DOC_INDEX_STATUS_MAP
@@ -105,13 +107,16 @@ const StatusItem = ({
)}
>
<StatusDot status={statusItem.status} className={reverse ? 'ml-2' : 'mr-2'} />
- <span className={cn(`${STATUS_TEXT_COLOR_MAP[statusItem.status]} text-sm`, textCls)}>
+ <span
+ id={statusLabelId}
+ className={cn(`${STATUS_TEXT_COLOR_MAP[statusItem.status]} text-sm`, textCls)}
+ >
{statusItem.text}
</span>
{errorMessage && (
<Infotip>
- <InfotipTrigger aria-label={errorMessage} className="ml-1" />
- <InfotipContent aria-label={errorMessage} className="max-w-65">
+ <InfotipTrigger aria-labelledby={statusLabelId} className="ml-1" />
+ <InfotipContent aria-labelledby={statusLabelId} className="max-w-65">
{errorMessage}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
index fc63eb547a5..606da878323 100644
--- a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
+++ b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
@@ -40,6 +40,8 @@ const EditMetadataBatchModal: FC<Props> = ({
onHide,
onShowManage,
}) => {
+ const applyToAllLabelId = React.useId()
+
const { t } = useTranslation()
const [templeList, setTempleList] = useState<MetadataItemWithEdit[]>(list)
const handleTemplesChange = useCallback(
@@ -200,23 +202,19 @@ const EditMetadataBatchModal: FC<Props> = ({
checked={isApplyToAllSelectDocument}
onCheckedChange={setIsApplyToAllSelectDocument}
/>
- <span className="mr-1 ml-2 system-xs-medium text-text-secondary">
+ <span
+ id={applyToAllLabelId}
+ className="mr-1 ml-2 system-xs-medium text-text-secondary"
+ >
{t(($) => $[`${i18nPrefix}.applyToAllSelectDocument`], { ns: 'dataset' })}
</span>
</label>
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.applyToAllSelectDocumentTip`], {
- ns: 'dataset',
- })}
+ aria-labelledby={applyToAllLabelId}
className="p-px text-text-tertiary"
/>
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.applyToAllSelectDocumentTip`], {
- ns: 'dataset',
- })}
- className="max-w-60"
- >
+ <InfotipContent aria-labelledby={applyToAllLabelId} className="max-w-60">
{t(($) => $[`${i18nPrefix}.applyToAllSelectDocumentTip`], { ns: 'dataset' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
index 72e5d366d42..920aad9650b 100644
--- a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
+++ b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
@@ -162,6 +162,8 @@ const DatasetMetadataDrawer: FC<Props> = ({
onRename,
onRemove,
}) => {
+ const builtInLabelId = React.useId()
+
const { t } = useTranslation()
const [isShowRenameModal, setIsShowRenameModal] = useState(false)
const [currPayload, setCurrPayload] = useState<MetadataItemWithValueLength | null>(null)
@@ -262,21 +264,15 @@ const DatasetMetadataDrawer: FC<Props> = ({
<div className="mt-3 flex h-6 items-center">
<Switch checked={isBuiltInEnabled} onCheckedChange={onIsBuiltInEnabledChange} />
- <div className="mr-0.5 ml-2 system-sm-semibold text-text-secondary">
+ <div
+ id={builtInLabelId}
+ className="mr-0.5 ml-2 system-sm-semibold text-text-secondary"
+ >
{t(($) => $[`${i18nPrefix}.builtIn`], { ns: 'dataset' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.builtInDescription`], {
- ns: 'dataset',
- })}
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.builtInDescription`], {
- ns: 'dataset',
- })}
- className="max-w-25"
- >
+ <InfotipTrigger aria-labelledby={builtInLabelId} />
+ <InfotipContent aria-labelledby={builtInLabelId} className="max-w-25">
{t(($) => $[`${i18nPrefix}.builtInDescription`], { ns: 'dataset' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/metadata/metadata-document/__tests__/info-group.spec.tsx b/web/app/components/datasets/metadata/metadata-document/__tests__/info-group.spec.tsx
index c445bde7abe..d5a27763110 100644
--- a/web/app/components/datasets/metadata/metadata-document/__tests__/info-group.spec.tsx
+++ b/web/app/components/datasets/metadata/metadata-document/__tests__/info-group.spec.tsx
@@ -89,7 +89,7 @@ describe('InfoGroup', () => {
titleTooltip="This is a tooltip"
/>,
)
- expect(screen.getByLabelText('This is a tooltip'))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Test' }))!.toBeInTheDocument()
})
it('should render headerRight content', () => {
diff --git a/web/app/components/datasets/metadata/metadata-document/info-group.tsx b/web/app/components/datasets/metadata/metadata-document/info-group.tsx
index a252226b322..52c95980af8 100644
--- a/web/app/components/datasets/metadata/metadata-document/info-group.tsx
+++ b/web/app/components/datasets/metadata/metadata-document/info-group.tsx
@@ -47,6 +47,8 @@ const InfoGroup: FC<Props> = ({
onSelect,
onAdd,
}) => {
+ const titleId = React.useId()
+
const router = useRouter()
const { t } = useTranslation()
const { formatTime: formatTimestamp } = useTimestamp()
@@ -62,6 +64,7 @@ const InfoGroup: FC<Props> = ({
<div className="flex items-center justify-between">
<div className="flex items-center space-x-1">
<div
+ id={titleId}
className={cn(
'text-text-secondary',
uppercaseTitle ? 'system-xs-semibold-uppercase' : 'system-md-semibold',
@@ -71,8 +74,8 @@ const InfoGroup: FC<Props> = ({
</div>
{titleTooltip && (
<Infotip>
- <InfotipTrigger aria-label={titleTooltip} />
- <InfotipContent aria-label={titleTooltip} className="max-w-60">
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="max-w-60">
{titleTooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx b/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx
index 1b56944dbfe..70ed5e95c3d 100644
--- a/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx
+++ b/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx
@@ -24,14 +24,6 @@ describe('KeyWordNumber', () => {
).toBeInTheDocument()
})
- it('should render infotip with question icon', () => {
- render(<KeyWordNumber {...defaultProps} />)
- const trigger = screen.getByRole('button', { name: 'datasetSettings.form.numberOfKeywords' })
- const container = trigger.parentElement
- const questionIcon = container?.querySelector('.i-ri-question-line')
- expect(questionIcon).toBeInTheDocument()
- })
-
it('should render slider', () => {
render(<KeyWordNumber {...defaultProps} />)
expect(getSlider()).toBeInTheDocument()
diff --git a/web/app/components/datasets/settings/index-method/keyword-number.tsx b/web/app/components/datasets/settings/index-method/keyword-number.tsx
index 25cea23fbf6..4622ad713f1 100644
--- a/web/app/components/datasets/settings/index-method/keyword-number.tsx
+++ b/web/app/components/datasets/settings/index-method/keyword-number.tsx
@@ -1,5 +1,4 @@
import { Fieldset, FieldsetLegend } from '@langgenius/dify-ui/fieldset'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import {
NumberField,
NumberFieldControls,
@@ -45,10 +44,6 @@ const KeyWordNumber = ({ disabled, keywordNumber, onKeywordNumberChange }: KeyWo
<FieldsetLegend className="sr-only">{label}</FieldsetLegend>
<div className="flex grow items-center gap-x-0.5">
<div className="truncate system-xs-medium text-text-secondary">{label}</div>
- <Infotip>
- <InfotipTrigger aria-label={label} className="size-3.5" />
- <InfotipContent aria-label={label}>{label}</InfotipContent>
- </Infotip>
</div>
<Slider
disabled={disabled}
diff --git a/web/app/components/datasets/settings/summary-index-setting.tsx b/web/app/components/datasets/settings/summary-index-setting.tsx
index 10b0a78e12a..e06137968bf 100644
--- a/web/app/components/datasets/settings/summary-index-setting.tsx
+++ b/web/app/components/datasets/settings/summary-index-setting.tsx
@@ -77,13 +77,8 @@ const SummaryIndexSetting = ({
{t(($) => $['form.summaryAutoGen'], { ns: 'datasetSettings' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['form.summaryAutoGenTip'], { ns: 'datasetSettings' })}
- className="ml-1"
- />
- <InfotipContent
- aria-label={t(($) => $['form.summaryAutoGenTip'], { ns: 'datasetSettings' })}
- >
+ <InfotipTrigger aria-labelledby={summaryLabelId} className="ml-1" />
+ <InfotipContent aria-labelledby={summaryLabelId}>
{t(($) => $['form.summaryAutoGenTip'], { ns: 'datasetSettings' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx
index 6296f037832..13267e92264 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx
@@ -159,8 +159,14 @@ function Form<
const infotipText = infotip?.[language] || infotip?.en_US
const infotipContent = infotipText && (
<Infotip>
- <InfotipTrigger aria-label={infotipText} className="ml-1" />
- <InfotipContent aria-label={infotipText} className="w-50">
+ <InfotipTrigger
+ aria-label={formSchema.label[language] || formSchema.label.en_US}
+ className="ml-1"
+ />
+ <InfotipContent
+ aria-label={formSchema.label[language] || formSchema.label.en_US}
+ className="w-50"
+ >
{infotipText}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/Form.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/Form.spec.tsx
index 95800ce8d65..f6e7f1e719a 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/Form.spec.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/Form.spec.tsx
@@ -1272,10 +1272,10 @@ describe('Form', () => {
expect(screen.getByText('Region'))!.toBeInTheDocument()
expect(screen.getByRole('combobox', { name: 'Model' }))!.toBeInTheDocument()
expect(screen.getByText('Agree'))!.toBeInTheDocument()
- expect(screen.getByLabelText('Enter your API key here'))!.toBeInTheDocument()
- expect(screen.getByLabelText('Select region'))!.toBeInTheDocument()
- expect(screen.getByLabelText('Choose model'))!.toBeInTheDocument()
- expect(screen.getByLabelText('Agree tooltip'))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'API Key' }))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Region' }))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Model' }))!.toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Agree' }))!.toBeInTheDocument()
})
it('should render required asterisk for radio, select, checkbox, and other field types', () => {
diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx
index fc81edb8299..15d02c88b56 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx
@@ -448,14 +448,8 @@ function ParameterItem({
</div>
{parameterRule.help && (
<Infotip>
- <InfotipTrigger
- aria-label={parameterRule.help[language] || parameterRule.help.en_US}
- className="mr-1"
- />
- <InfotipContent
- aria-label={parameterRule.help[language] || parameterRule.help.en_US}
- className="w-37.5 whitespace-pre-wrap"
- >
+ <InfotipTrigger aria-labelledby={labelId} className="mr-1" />
+ <InfotipContent aria-labelledby={labelId} className="w-37.5 whitespace-pre-wrap">
{parameterRule.help[language] || parameterRule.help.en_US}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx
index 0379621c5ed..43e4a6f0e73 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx
@@ -1,6 +1,7 @@
import type { UsagePriority } from '../use-credential-panel-state'
import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { PreferredProviderTypeEnum } from '../../declarations'
@@ -20,6 +21,8 @@ export default function UsagePrioritySection({
disabled,
onSelect,
}: UsagePrioritySectionProps) {
+ const priorityLabelId = useId()
+
const { t } = useTranslation()
const selectedKey =
value === 'credits' ? PreferredProviderTypeEnum.system : PreferredProviderTypeEnum.custom
@@ -35,12 +38,12 @@ export default function UsagePrioritySection({
/>
</div>
<div className="flex min-w-0 flex-1 items-center gap-0.5 py-0.5">
- <span className="truncate system-sm-medium text-text-secondary">
+ <span id={priorityLabelId} className="truncate system-sm-medium text-text-secondary">
{t(($) => $['modelProvider.card.usagePriority'], { ns: 'common' })}
</span>
<Infotip>
- <InfotipTrigger aria-label={usagePriorityTip} />
- <InfotipContent aria-label={usagePriorityTip}>{usagePriorityTip}</InfotipContent>
+ <InfotipTrigger aria-labelledby={priorityLabelId} />
+ <InfotipContent aria-labelledby={priorityLabelId}>{usagePriorityTip}</InfotipContent>
</Infotip>
</div>
<div className="flex shrink-0 items-center gap-1">
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx
index ee5933c17df..bfb46378eb8 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx
@@ -14,7 +14,7 @@ import { StatusDot } from '@langgenius/dify-ui/status-dot'
import { Switch } from '@langgenius/dify-ui/switch'
import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'
import { useQuery, useSuspenseQuery } from '@tanstack/react-query'
-import { useCallback, useMemo } from 'react'
+import { useCallback, useId, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import Badge from '@/app/components/base/badge/index'
import GridMask from '@/app/components/base/grid-mask'
@@ -53,6 +53,8 @@ const ModelLoadBalancingConfigs = ({
onUpdate,
onRemove,
}: ModelLoadBalancingConfigsProps) => {
+ const loadBalancingLabelId = useId()
+
const { t } = useTranslation()
const { data: deploymentEdition } = useSuspenseQuery({
...systemFeaturesQueryOptions(),
@@ -187,16 +189,16 @@ const ModelLoadBalancingConfigs = ({
</div>
<div className="grow">
<div className="flex items-center gap-1 text-sm text-text-primary">
- {t(($) => $['modelProvider.loadBalancing'], { ns: 'common' })}
+ <span id={loadBalancingLabelId}>
+ {t(($) => $['modelProvider.loadBalancing'], { ns: 'common' })}
+ </span>
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['modelProvider.loadBalancingInfo'], { ns: 'common' })}
+ aria-labelledby={loadBalancingLabelId}
className="size-3"
iconSize="small"
/>
- <InfotipContent
- aria-label={t(($) => $['modelProvider.loadBalancingInfo'], { ns: 'common' })}
- >
+ <InfotipContent aria-labelledby={loadBalancingLabelId}>
{t(($) => $['modelProvider.loadBalancingInfo'], { ns: 'common' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
index 85af148ccaf..0b5de3c955e 100644
--- a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
@@ -8,7 +8,7 @@ import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/inf
import { useQuery } from '@tanstack/react-query'
import { useAtomValue } from 'jotai'
import { parseAsStringLiteral, useQueryState } from 'nuqs'
-import { useState } from 'react'
+import { useId, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from '@/app/notifications'
import { workspacePermissionKeysAtom } from '@/context/permission-state'
@@ -63,6 +63,8 @@ const SystemModel: FC<SystemModelSelectorProps> = ({
hideProviderSettingsFooter,
onOpenMarketplace,
}) => {
+ const modelLabelId = useId()
+
const { t } = useTranslation()
const workspacePermissionKeys = useAtomValue(workspacePermissionKeysAtom)
const { data: textGenerationModelList = [] } = useQuery(
@@ -213,10 +215,13 @@ const SystemModel: FC<SystemModelSelectorProps> = ({
return (
<div className="flex min-h-6 items-center text-[13px] font-medium text-text-secondary">
- {t(($) => $[labelKey], { ns: 'common' })}
+ <span id={`${modelLabelId}-${labelKey}`}>{t(($) => $[labelKey], { ns: 'common' })}</span>
<Infotip>
- <InfotipTrigger aria-label={tipText} className="ml-0.5 text-text-tertiary" />
- <InfotipContent aria-label={tipText} className="w-65.25">
+ <InfotipTrigger
+ aria-labelledby={`${modelLabelId}-${labelKey}`}
+ className="ml-0.5 text-text-tertiary"
+ />
+ <InfotipContent aria-labelledby={`${modelLabelId}-${labelKey}`} className="w-65.25">
{tipText}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx
index d353a23cb88..40e5968e963 100644
--- a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx
@@ -42,6 +42,8 @@ const MultipleToolSelector = ({
availableNodes,
nodeId,
}: Props) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const { allowed: isMCPToolAllowed } = useMCPToolAvailability()
const { data: mcpTools } = useAllMCPTools()
@@ -132,7 +134,10 @@ const MultipleToolSelector = ({
aria-label={label}
className="group/collapse flex h-6 min-h-0 min-w-0 touch-manipulation items-center justify-start gap-0.5 rounded-lg bg-transparent system-sm-medium text-text-secondary outline-hidden select-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-state-accent-solid data-panel-open:text-text-primary"
>
- <span className="truncate system-sm-semibold-uppercase text-text-secondary">
+ <span
+ id={titleId}
+ className="truncate system-sm-semibold-uppercase text-text-secondary"
+ >
{label}
</span>
{required && <span className="text-red-500">*</span>}
@@ -146,7 +151,10 @@ const MultipleToolSelector = ({
</CollapsibleTrigger>
) : (
<>
- <div className="flex h-6 min-w-0 items-center truncate system-sm-semibold-uppercase text-text-secondary">
+ <div
+ id={titleId}
+ className="flex h-6 min-w-0 items-center truncate system-sm-semibold-uppercase text-text-secondary"
+ >
{label}
</div>
{required && <div className="text-red-500">*</div>}
@@ -154,13 +162,8 @@ const MultipleToolSelector = ({
)}
{tooltip ? (
<Infotip>
- <InfotipTrigger
- aria-label={typeof tooltip === 'string' ? tooltip : label}
- className="size-3.5"
- />
- <InfotipContent aria-label={typeof tooltip === 'string' ? tooltip : label}>
- {tooltip}
- </InfotipContent>
+ <InfotipTrigger aria-labelledby={titleId} className="size-3.5" />
+ <InfotipContent aria-labelledby={titleId}>{tooltip}</InfotipContent>
</Infotip>
) : null}
</div>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx
index 803e74bf5aa..bb64f851b6f 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx
@@ -186,13 +186,13 @@ export const CreateSubscriptionButton = ({
extra: (
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['subscription.addType.options.manual.tip'], {
+ aria-label={t(($) => $['subscription.addType.options.manual.description'], {
ns: 'pluginTrigger',
})}
className="size-3.5"
/>
<InfotipContent
- aria-label={t(($) => $['subscription.addType.options.manual.tip'], {
+ aria-label={t(($) => $['subscription.addType.options.manual.description'], {
ns: 'pluginTrigger',
})}
>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx
index dbbff0a3136..44db2049870 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx
@@ -18,6 +18,8 @@ export const SubscriptionListView: React.FC<SubscriptionListViewProps> = ({
showTopBorder = false,
pluginDetail,
}) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const { subscriptions } = useSubscriptionList()
@@ -28,17 +30,12 @@ export const SubscriptionListView: React.FC<SubscriptionListViewProps> = ({
<div className="relative flex items-center justify-between">
{subscriptionCount > 0 && (
<div className="flex h-8 shrink-0 items-center gap-1">
- <span className="system-sm-semibold-uppercase text-text-secondary">
+ <span id={titleId} className="system-sm-semibold-uppercase text-text-secondary">
{t(($) => $['subscription.listNum'], { ns: 'pluginTrigger', num: subscriptionCount })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
- className="size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
- >
+ <InfotipTrigger aria-labelledby={titleId} className="size-3.5" />
+ <InfotipContent aria-labelledby={titleId}>
{t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-view.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-view.tsx
index 1003ff8e395..bc56c541bcf 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-view.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-view.tsx
@@ -20,6 +20,8 @@ export const SubscriptionSelectorView: React.FC<SubscriptionSelectorProps> = ({
selectedId,
onSelect,
}) => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
const { subscriptions } = useSubscriptionList()
const [deletedSubscription, setDeletedSubscription] = useState<TriggerSubscription | null>(null)
@@ -30,17 +32,12 @@ export const SubscriptionSelectorView: React.FC<SubscriptionSelectorProps> = ({
{subscriptionCount > 0 && (
<div className="mr-1.5 ml-7 flex h-8 items-center justify-between">
<div className="flex shrink-0 items-center gap-1">
- <span className="system-sm-semibold-uppercase text-text-secondary">
+ <span id={titleId} className="system-sm-semibold-uppercase text-text-secondary">
{t(($) => $['subscription.listNum'], { ns: 'pluginTrigger', num: subscriptionCount })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
- className="size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
- >
+ <InfotipTrigger aria-labelledby={titleId} className="size-3.5" />
+ <InfotipContent aria-labelledby={titleId}>
{t(($) => $['subscription.list.tip'], { ns: 'pluginTrigger' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx
index 562279343d1..26007410a80 100644
--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx
@@ -18,7 +18,7 @@ import { Switch } from '@langgenius/dify-ui/switch'
import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'
import { useSuspenseQuery } from '@tanstack/react-query'
import { useBoolean } from 'ahooks'
-import { useCallback, useState } from 'react'
+import { useCallback, useId, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
@@ -66,6 +66,8 @@ const ReasoningConfigForm: React.FC<Props> = ({
availableNodes,
nodeId,
}) => {
+ const fieldLabelId = useId()
+
const { t } = useTranslation()
const language = useLanguage()
const { data: timezone } = useSuspenseQuery({
@@ -149,8 +151,8 @@ const ReasoningConfigForm: React.FC<Props> = ({
const tooltipText = tooltip?.[language] || tooltip?.en_US
const tooltipContent = tooltipText && (
<Infotip>
- <InfotipTrigger aria-label={tooltipText} className="ml-0.5" />
- <InfotipContent aria-label={tooltipText} className="w-50">
+ <InfotipTrigger aria-labelledby={`${fieldLabelId}-${variable}`} className="ml-0.5" />
+ <InfotipContent aria-labelledby={`${fieldLabelId}-${variable}`} className="w-50">
{tooltipText}
</InfotipContent>
</Infotip>
@@ -186,7 +188,10 @@ const ReasoningConfigForm: React.FC<Props> = ({
<div key={variable} className="space-y-0.5">
<div className="flex items-center justify-between py-2 system-sm-semibold text-text-secondary">
<div className="flex items-center">
- <span className={cn('max-w-35 truncate code-sm-semibold text-text-secondary')}>
+ <span
+ id={`${fieldLabelId}-${variable}`}
+ className={cn('max-w-35 truncate code-sm-semibold text-text-secondary')}
+ >
{fieldTitle}
</span>
{required && <span className="ml-1 text-red-500">*</span>}
diff --git a/web/app/components/rag-pipeline/components/panel/input-field/index.tsx b/web/app/components/rag-pipeline/components/panel/input-field/index.tsx
index 22bb4ba54f5..7ff20503d5d 100644
--- a/web/app/components/rag-pipeline/components/panel/input-field/index.tsx
+++ b/web/app/components/rag-pipeline/components/panel/input-field/index.tsx
@@ -6,7 +6,7 @@ import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { Separator } from '@langgenius/dify-ui/separator'
import { RiCloseLine, RiEyeLine } from '@remixicon/react'
-import { memo, useCallback, useMemo, useRef } from 'react'
+import { memo, useCallback, useId, useMemo, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import { useNodes } from 'reactflow'
import { useHooksStore } from '@/app/components/workflow/hooks-store'
@@ -20,6 +20,8 @@ import Datasource from './label-right-content/datasource'
import GlobalInputs from './label-right-content/global-inputs'
const InputFieldPanel = () => {
+ const uniqueInputsLabelId = useId()
+
const { t } = useTranslation()
const nodes = useNodes<DataSourceNodeType>()
const { closeAllInputFieldPanels, toggleInputFieldPreviewPanel, isPreviewing, isEditing } =
@@ -130,21 +132,15 @@ const InputFieldPanel = () => {
<div className="flex grow flex-col overflow-y-auto">
{/* Unique Inputs for Each Entrance */}
<div className="flex h-6 items-center gap-x-0.5 px-4 pt-2">
- <span className="system-sm-semibold-uppercase text-text-secondary">
+ <span
+ id={uniqueInputsLabelId}
+ className="system-sm-semibold-uppercase text-text-secondary"
+ >
{t(($) => $['inputFieldPanel.uniqueInputs.title'], { ns: 'datasetPipeline' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['inputFieldPanel.uniqueInputs.tooltip'], {
- ns: 'datasetPipeline',
- })}
- />
- <InfotipContent
- aria-label={t(($) => $['inputFieldPanel.uniqueInputs.tooltip'], {
- ns: 'datasetPipeline',
- })}
- className="max-w-60"
- >
+ <InfotipTrigger aria-labelledby={uniqueInputsLabelId} />
+ <InfotipContent aria-labelledby={uniqueInputsLabelId} className="max-w-60">
{t(($) => $['inputFieldPanel.uniqueInputs.tooltip'], { ns: 'datasetPipeline' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/rag-pipeline/components/panel/input-field/label-right-content/global-inputs.tsx b/web/app/components/rag-pipeline/components/panel/input-field/label-right-content/global-inputs.tsx
index 448ecda6b82..925d66c1837 100644
--- a/web/app/components/rag-pipeline/components/panel/input-field/label-right-content/global-inputs.tsx
+++ b/web/app/components/rag-pipeline/components/panel/input-field/label-right-content/global-inputs.tsx
@@ -3,25 +3,18 @@ import * as React from 'react'
import { useTranslation } from 'react-i18next'
const GlobalInputs = () => {
+ const titleId = React.useId()
+
const { t } = useTranslation()
return (
<div className="flex items-center gap-x-1">
- <span className="system-sm-semibold-uppercase text-text-secondary">
+ <span id={titleId} className="system-sm-semibold-uppercase text-text-secondary">
{t(($) => $['inputFieldPanel.globalInputs.title'], { ns: 'datasetPipeline' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['inputFieldPanel.globalInputs.tooltip'], {
- ns: 'datasetPipeline',
- })}
- />
- <InfotipContent
- aria-label={t(($) => $['inputFieldPanel.globalInputs.tooltip'], {
- ns: 'datasetPipeline',
- })}
- className="w-60"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-60">
{t(($) => $['inputFieldPanel.globalInputs.tooltip'], { ns: 'datasetPipeline' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx
index 8da1502b952..c1bbcf0650e 100644
--- a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx
+++ b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx
@@ -60,6 +60,9 @@ function SelectItem<Value = string>({ text, value, isChecked }: ItemProps<Value>
}
export default function ConfigCredential({ positionCenter, credential, onChange, onHide }: Props) {
+ const queryLabelId = useId()
+ const headerLabelId = useId()
+
const { t } = useTranslation()
const apiKeyHeaderInputId = useId()
const apiKeyHeaderValueInputId = useId()
@@ -210,22 +213,12 @@ export default function ConfigCredential({ positionCenter, credential, onChange,
</Field>
<div>
<div className="flex items-center py-2 system-sm-medium text-text-primary">
- <label htmlFor={apiKeyHeaderInputId}>
+ <label id={headerLabelId} htmlFor={apiKeyHeaderInputId}>
{t(($) => $['createTool.authMethod.key'], { ns: 'tools' })}
</label>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['createTool.authMethod.keyTooltip'], {
- ns: 'tools',
- })}
- className="ml-0.5"
- />
- <InfotipContent
- aria-label={t(($) => $['createTool.authMethod.keyTooltip'], {
- ns: 'tools',
- })}
- className="w-65.25"
- >
+ <InfotipTrigger aria-labelledby={headerLabelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={headerLabelId} className="w-65.25">
{t(($) => $['createTool.authMethod.keyTooltip'], { ns: 'tools' })}
</InfotipContent>
</Infotip>
@@ -277,22 +270,12 @@ export default function ConfigCredential({ positionCenter, credential, onChange,
<>
<div>
<div className="flex items-center py-2 system-sm-medium text-text-primary">
- <label htmlFor={apiKeyQueryInputId}>
+ <label id={queryLabelId} htmlFor={apiKeyQueryInputId}>
{t(($) => $['createTool.authMethod.queryParam'], { ns: 'tools' })}
</label>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['createTool.authMethod.queryParamTooltip'], {
- ns: 'tools',
- })}
- className="ml-0.5"
- />
- <InfotipContent
- aria-label={t(($) => $['createTool.authMethod.queryParamTooltip'], {
- ns: 'tools',
- })}
- className="w-65.25"
- >
+ <InfotipTrigger aria-labelledby={queryLabelId} className="ml-0.5" />
+ <InfotipContent aria-labelledby={queryLabelId} className="w-65.25">
{t(($) => $['createTool.authMethod.queryParamTooltip'], {
ns: 'tools',
})}
diff --git a/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx b/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx
index 17d7848d98b..c42fc703a72 100644
--- a/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx
+++ b/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx
@@ -173,7 +173,7 @@ describe('WorkflowToolDrawer', () => {
expect(
screen.queryByRole('button', {
- name: /reservedParameterDuplicateTip|duplicateOutputVariable/,
+ name: 'answer',
}),
).not.toBeInTheDocument()
})
@@ -186,7 +186,7 @@ describe('WorkflowToolDrawer', () => {
const userOutputRow = screen.getByRole('row', { name: /text.*Reserved output duplicate/ })
expect(
within(userOutputRow).getByRole('button', {
- name: 'tools.createTool.toolOutput.reservedParameterDuplicateTip',
+ name: 'text',
}),
).toBeInTheDocument()
@@ -228,7 +228,7 @@ describe('WorkflowToolDrawer', () => {
).toBeInTheDocument()
const duplicateWarnings = screen.getAllByRole('button', {
- name: /workflow\.errorMsg\.duplicateOutputVariable/,
+ name: 'result',
})
expect(duplicateWarnings).toHaveLength(2)
@@ -266,7 +266,7 @@ describe('WorkflowToolDrawer', () => {
)
const issueWarnings = screen.getAllByRole('button', {
- name: /tools\.createTool\.toolOutput\.reservedParameterDuplicateTip.*workflow\.errorMsg\.duplicateOutputVariable/,
+ name: 'text',
})
expect(issueWarnings).toHaveLength(2)
diff --git a/web/app/components/tools/workflow-tool/index.tsx b/web/app/components/tools/workflow-tool/index.tsx
index d3f41684b11..7c967d285de 100644
--- a/web/app/components/tools/workflow-tool/index.tsx
+++ b/web/app/components/tools/workflow-tool/index.tsx
@@ -86,17 +86,6 @@ type WorkflowToolDrawerFrameProps = {
children: React.ReactNode
}
-const InfoTooltip = ({ children }: { children: string }) => {
- return (
- <Infotip>
- <InfotipTrigger aria-label={children} className="ml-1 size-3.5" />
- <InfotipContent aria-label={children} className="w-45">
- {children}
- </InfotipContent>
- </Infotip>
- )
-}
-
const WorkflowToolDrawerFrame = ({
title,
closeLabel,
@@ -155,6 +144,8 @@ const WorkflowToolOutputName = React.memo(
item: WorkflowToolProviderOutputParameter
reservedOutputParameters: WorkflowToolProviderOutputParameter[]
}) => {
+ const outputNameId = React.useId()
+
const { t } = useTranslation()
const reservedOutputDuplicateTip = t(
($) => $['createTool.toolOutput.reservedParameterDuplicateTip'],
@@ -168,17 +159,14 @@ const WorkflowToolOutputName = React.memo(
const hasReservedNameConflict =
!item.reserved && hasReservedWorkflowOutputConflict(reservedOutputParameters, item.name)
const hasDuplicateNameConflict = !item.reserved && !!duplicateSources
- const issueLabel = hasReservedNameConflict
- ? hasDuplicateNameConflict
- ? `${reservedOutputDuplicateTip} ${duplicateOutputTip}`
- : reservedOutputDuplicateTip
- : duplicateOutputTip
const sources = duplicateSources || []
return (
<div className="text-[13px] leading-4.5">
<div className="flex min-w-0 items-center gap-x-1">
- <span className="truncate font-medium text-text-primary">{item.name}</span>
+ <span id={outputNameId} className="truncate font-medium text-text-primary">
+ {item.name}
+ </span>
{item.reserved && (
<span className="shrink-0 text-xs leading-4.5 text-[#ec4a0a]">
{t(($) => $['createTool.toolOutput.reserved'], { ns: 'tools' })}
@@ -187,13 +175,13 @@ const WorkflowToolOutputName = React.memo(
{hasReservedNameConflict || hasDuplicateNameConflict ? (
<Infotip>
<InfotipTrigger
- aria-label={issueLabel}
+ aria-labelledby={outputNameId}
className="text-text-warning-secondary"
iconSize="small"
iconVariant="warning"
/>
<InfotipContent
- aria-label={issueLabel}
+ aria-labelledby={outputNameId}
className={hasDuplicateNameConflict ? 'w-60' : 'w-45'}
>
<div className="space-y-2">
@@ -242,6 +230,7 @@ export function WorkflowToolDrawer({
}: WorkflowToolDrawerProps) {
const { t } = useTranslation()
const parameterId = React.useId()
+ const toolNameLabelId = React.useId()
const [showEmojiPicker, setShowEmojiPicker] = useState<boolean>(false)
const [emoji, setEmoji] = useState<Emoji>(payload.icon)
@@ -372,15 +361,18 @@ export function WorkflowToolDrawer({
{/* name for tool call */}
<Field name="name" className="gap-0" invalid={!isWorkflowToolNameValid(name)}>
<div className="flex items-center py-2 system-sm-medium text-text-primary">
- <FieldLabel className="py-0 text-text-primary">
+ <FieldLabel id={toolNameLabelId} className="py-0 text-text-primary">
{t(($) => $['createTool.nameForToolCall'], { ns: 'tools' })}
</FieldLabel>
<span aria-hidden className="ml-1 text-text-destructive">
*
</span>
- <InfoTooltip>
- {t(($) => $['createTool.nameForToolCallPlaceHolder'], { ns: 'tools' })}
- </InfoTooltip>
+ <Infotip>
+ <InfotipTrigger aria-labelledby={toolNameLabelId} className="ml-1 size-3.5" />
+ <InfotipContent aria-labelledby={toolNameLabelId} className="w-45">
+ {t(($) => $['createTool.nameForToolCallPlaceHolder'], { ns: 'tools' })}
+ </InfotipContent>
+ </Infotip>
</div>
<Input
className="h-10"
diff --git a/web/app/components/workflow/nodes/_base/components/__tests__/field.spec.tsx b/web/app/components/workflow/nodes/_base/components/__tests__/field.spec.tsx
index 94af7cf6a39..9a941cb1978 100644
--- a/web/app/components/workflow/nodes/_base/components/__tests__/field.spec.tsx
+++ b/web/app/components/workflow/nodes/_base/components/__tests__/field.spec.tsx
@@ -1,7 +1,40 @@
-import { fireEvent, render, screen } from '@testing-library/react'
+import { fireEvent, render, screen, within } from '@testing-library/react'
+import userEvent from '@testing-library/user-event'
import Field from '../field'
describe('Field', () => {
+ it('names each explanation from its visible topic and keeps rich content in the dialog', async () => {
+ const user = userEvent.setup()
+ render(
+ <>
+ <Field
+ title={<span>Retrieval settings</span>}
+ tooltip={<p>Choose how documents are ranked.</p>}
+ />
+ <Field
+ title={<span>Model settings</span>}
+ tooltip={
+ <p>
+ Choose a model for this node. <a href="https://docs.dify.ai">Model documentation</a>
+ </p>
+ }
+ />
+ </>,
+ )
+
+ expect(screen.getByRole('button', { name: 'Retrieval settings' })).toBeInTheDocument()
+ expect(screen.queryByRole('dialog')).not.toBeInTheDocument()
+ await user.click(screen.getByRole('button', { name: 'Model settings' }))
+
+ const dialog = await screen.findByRole('dialog', { name: 'Model settings' })
+ expect(within(dialog).getByText(/Choose a model for this node/)).toBeVisible()
+ expect(within(dialog).getByRole('link', { name: 'Model documentation' })).toBeVisible()
+ expect(screen.getByRole('button', { name: 'Model settings' })).toHaveAccessibleName(
+ 'Model settings',
+ )
+ expect(screen.queryByRole('dialog', { name: 'Retrieval settings' })).not.toBeInTheDocument()
+ })
+
it('should toggle folded children when supportFold is enabled', () => {
render(
<Field title="Foldable" supportFold>
diff --git a/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx b/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx
index 055eaaf46d7..10102103dd7 100644
--- a/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx
+++ b/web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx
@@ -5,10 +5,10 @@ import type {
ListRef,
} from '@/app/components/workflow/block-selector/marketplace-plugin/list'
import { cn } from '@langgenius/dify-ui/cn'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { Infotip, InfotipContent, InfotipTitle, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'
import { useQuery, useSuspenseQuery } from '@tanstack/react-query'
-import { memo, useEffect, useId, useMemo, useRef, useState } from 'react'
+import { memo, useEffect, useMemo, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { SearchInput } from '@/app/components/base/search-input'
import useGetIcon from '@/app/components/plugins/install-plugin/base/use-get-icon'
@@ -31,8 +31,6 @@ const DEFAULT_TAGS: ListProps['tags'] = []
const NotFoundWarn = (props: { title: string; description: ReactNode }) => {
const { title, description } = props
- const titleId = useId()
-
const { t } = useTranslation()
return (
<Infotip>
@@ -42,11 +40,9 @@ const NotFoundWarn = (props: { title: string; description: ReactNode }) => {
iconSize="large"
className="text-text-destructive"
/>
- <InfotipContent aria-labelledby={titleId} className="w-45">
+ <InfotipContent className="w-45">
<div className="space-y-1">
- <h3 id={titleId} className="font-semibold text-text-primary">
- {title}
- </h3>
+ <InfotipTitle className="font-semibold text-text-primary">{title}</InfotipTitle>
<p>{description}</p>
<p>
<Link href="/plugins" className="text-text-accent">
diff --git a/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-on-panel.tsx b/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-on-panel.tsx
index bfa84876b1e..2e1173ec1c2 100644
--- a/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-on-panel.tsx
+++ b/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-on-panel.tsx
@@ -1,6 +1,7 @@
import type { DefaultValueForm } from './types'
import type { CommonNodeType, Node } from '@/app/components/workflow/types'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { hasAgentV2OutputRoutes } from '@/app/components/workflow/nodes/agent-v2/types'
import {
@@ -21,6 +22,8 @@ import { ErrorHandleTypeEnum } from './types'
type ErrorHandleProps = Pick<Node, 'id' | 'data'>
const ErrorHandle = ({ id, data }: ErrorHandleProps) => {
+ const titleId = useId()
+
const { t } = useTranslation()
const { error_strategy, default_value } = data
const { collapsed, setCollapsed, handleErrorHandleTypeChange } = useErrorHandle(id, data)
@@ -40,17 +43,15 @@ const ErrorHandle = ({ id, data }: ErrorHandleProps) => {
<CollapseHeader>
<CollapseTrigger>
<CollapseTitle>
- {t(($) => $['nodes.common.errorHandle.title'], { ns: 'workflow' })}
+ <span id={titleId}>
+ {t(($) => $['nodes.common.errorHandle.title'], { ns: 'workflow' })}
+ </span>
</CollapseTitle>
{!!error_strategy && <CollapseIndicator />}
</CollapseTrigger>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['nodes.common.errorHandle.tip'], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $['nodes.common.errorHandle.tip'], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId}>
{t(($) => $['nodes.common.errorHandle.tip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/_base/components/field.tsx b/web/app/components/workflow/nodes/_base/components/field.tsx
index fb9bac6b4be..b385e5c817a 100644
--- a/web/app/components/workflow/nodes/_base/components/field.tsx
+++ b/web/app/components/workflow/nodes/_base/components/field.tsx
@@ -19,15 +19,6 @@ type Props = Readonly<{
warningDot?: boolean
}>
-const getTextFromNode = (node: ReactNode): string | undefined => {
- if (typeof node === 'string' || typeof node === 'number') return `${node}`
-
- if (Array.isArray(node)) return node.map(getTextFromNode).filter(Boolean).join(' ')
-
- if (React.isValidElement<{ children?: ReactNode }>(node))
- return getTextFromNode(node.props.children)
-}
-
const Field: FC<Props> = ({
className,
title,
@@ -40,10 +31,9 @@ const Field: FC<Props> = ({
required,
warningDot,
}) => {
+ const titleId = React.useId()
+
const [fold, setFold] = useState(true)
- const tooltipLabel = tooltip
- ? getTextFromNode(tooltip) || getTextFromNode(title) || 'Help'
- : undefined
return (
<div className={cn(className, inline && 'flex w-full items-center justify-between')}>
@@ -53,6 +43,7 @@ const Field: FC<Props> = ({
>
<div className="flex h-6 items-center">
<div
+ id={titleId}
className={cn(
'relative',
isSubTitle
@@ -61,14 +52,22 @@ const Field: FC<Props> = ({
)}
>
{warningDot && (
- <span className="absolute top-1/2 -left-2.25 size-1.25 -translate-y-1/2 rounded-full bg-text-warning-secondary" />
+ <span
+ aria-hidden
+ className="absolute top-1/2 -left-2.25 size-1.25 -translate-y-1/2 rounded-full bg-text-warning-secondary"
+ />
+ )}
+ {title}{' '}
+ {required && (
+ <span aria-hidden className="text-text-destructive">
+ *
+ </span>
)}
- {title} {required && <span className="text-text-destructive">*</span>}
</div>
- {!!tooltip && !!tooltipLabel && (
+ {!!tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltipLabel} className="ml-1" />
- <InfotipContent aria-label={tooltipLabel}>{tooltip}</InfotipContent>
+ <InfotipTrigger aria-labelledby={titleId} className="ml-1" />
+ <InfotipContent aria-labelledby={titleId}>{tooltip}</InfotipContent>
</Infotip>
)}
</div>
diff --git a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx
index b448fa85b95..7c2891b1f4f 100644
--- a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx
+++ b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx
@@ -15,7 +15,7 @@ describe('FieldTitle', () => {
expect(screen.getByText('Embedding')).toBeInTheDocument()
expect(screen.getByText('subtitle')).toBeInTheDocument()
- expect(screen.getByRole('button', { name: 'Tooltip copy' })).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Embedding' })).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'action' })).toBeInTheDocument()
expect(document.querySelector('.bg-text-warning-secondary')).not.toBeNull()
})
diff --git a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx
index 0f444b684fe..80d29252fa0 100644
--- a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx
+++ b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react'
import { cn } from '@langgenius/dify-ui/cn'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
-import { memo, useState } from 'react'
+import { memo, useId, useState } from 'react'
export type FieldTitleProps = {
title?: string
@@ -26,6 +26,8 @@ export const FieldTitle = memo(
collapsed,
onCollapse,
}: FieldTitleProps) => {
+ const titleId = useId()
+
const [collapsedLocal, setCollapsedLocal] = useState(true)
const collapsedMerged = collapsed !== undefined ? collapsed : collapsedLocal
@@ -41,7 +43,7 @@ export const FieldTitle = memo(
}}
>
<div className="flex items-center system-sm-semibold-uppercase text-text-secondary">
- <span className="relative">
+ <span id={titleId} className="relative">
{warningDot && (
<span className="absolute top-1/2 -left-2.25 size-1.25 -translate-y-1/2 rounded-full bg-text-warning-secondary" />
)}
@@ -58,8 +60,8 @@ export const FieldTitle = memo(
)}
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} className="ml-1" />
- <InfotipContent aria-label={tooltip}>{tooltip}</InfotipContent>
+ <InfotipTrigger aria-labelledby={titleId} className="ml-1" />
+ <InfotipContent aria-labelledby={titleId}>{tooltip}</InfotipContent>
</Infotip>
)}
</div>
diff --git a/web/app/components/workflow/nodes/_base/components/option-card.tsx b/web/app/components/workflow/nodes/_base/components/option-card.tsx
index 160c6ca96d0..1005aecd54a 100644
--- a/web/app/components/workflow/nodes/_base/components/option-card.tsx
+++ b/web/app/components/workflow/nodes/_base/components/option-card.tsx
@@ -40,6 +40,8 @@ const OptionCard: FC<Props> = ({
align = 'center',
tooltip,
}) => {
+ const titleId = React.useId()
+
const handleSelect = useCallback(() => {
if (selected || disabled) return
onSelect()
@@ -61,11 +63,11 @@ const OptionCard: FC<Props> = ({
)}
onClick={handleSelect}
>
- <span>{title}</span>
+ <span id={titleId}>{title}</span>
{tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip} />
- <InfotipContent aria-label={tooltip} className="w-60">
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-60">
{tooltip}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/_base/node-sections.tsx b/web/app/components/workflow/nodes/_base/node-sections.tsx
index c3c84f0a1e0..b813face820 100644
--- a/web/app/components/workflow/nodes/_base/node-sections.tsx
+++ b/web/app/components/workflow/nodes/_base/node-sections.tsx
@@ -2,8 +2,7 @@ import type { SelectorParam } from 'i18next'
import type { ReactElement } from 'react'
import type { IterationNodeType } from '@/app/components/workflow/nodes/iteration/types'
import type { NodeProps } from '@/app/components/workflow/types'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
-import { useId } from 'react'
+import { Infotip, InfotipContent, InfotipTitle, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { BlockEnum, NodeRunningStatus } from '@/app/components/workflow/types'
type HeaderMetaProps = {
@@ -20,7 +19,6 @@ export type WorkflowTranslator = (
) => string
export const NodeHeaderMeta = ({ data, hasVarValue, isLoading, loopIndex, t }: HeaderMetaProps) => {
- const titleId = useId()
return (
<>
{data.type === BlockEnum.Iteration && (data as IterationNodeType).is_parallel && (
@@ -34,10 +32,10 @@ export const NodeHeaderMeta = ({ data, hasVarValue, isLoading, loopIndex, t }: H
ns: 'workflow',
})}
/>
- <InfotipContent aria-labelledby={titleId} className="w-45">
- <div id={titleId} className="font-semibold text-text-primary">
+ <InfotipContent className="w-45">
+ <InfotipTitle className="font-semibold text-text-primary">
{t(($) => $['nodes.iteration.parallelModeEnableTitle'], { ns: 'workflow' })}
- </div>
+ </InfotipTitle>
{t(($) => $['nodes.iteration.parallelModeEnableDesc'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx b/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx
index 0eef3876de9..1496e7e3fd9 100644
--- a/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx
+++ b/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx
@@ -428,7 +428,7 @@ describe('agent/panel', () => {
expect(screen.getByText('Nadia')).toBeInTheDocument()
expect(screen.getByText('workflow.nodes.agent.task.label')).toBeInTheDocument()
expect(
- screen.getByRole('button', { name: 'workflow.nodes.agent.task.tooltip' }),
+ screen.getByRole('button', { name: 'workflow.nodes.agent.task.label' }),
).toBeInTheDocument()
expect(screen.getByRole('textbox', { name: 'workflow.nodes.agent.task.label' })).toHaveValue('')
expect(
@@ -448,7 +448,7 @@ describe('agent/panel', () => {
const user = userEvent.setup()
render(<AgentV2Panel id="agent-node" data={createData()} panelProps={panelProps} />)
- await user.click(screen.getByRole('button', { name: 'workflow.nodes.agent.task.tooltip' }))
+ await user.click(screen.getByRole('button', { name: 'workflow.nodes.agent.task.label' }))
expect(
await screen.findByRole('link', { name: 'workflow.nodes.agent.task.learnMore' }),
diff --git a/web/app/components/workflow/nodes/agent-v2/components/agent-task-field.tsx b/web/app/components/workflow/nodes/agent-v2/components/agent-task-field.tsx
index ee6a8369f37..137c46cca45 100644
--- a/web/app/components/workflow/nodes/agent-v2/components/agent-task-field.tsx
+++ b/web/app/components/workflow/nodes/agent-v2/components/agent-task-field.tsx
@@ -8,7 +8,7 @@ import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/inf
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
import { useBoolean } from 'ahooks'
import { $insertNodes } from 'lexical'
-import { useCallback } from 'react'
+import { useCallback, useId } from 'react'
import { useTranslation } from 'react-i18next'
import PromptEditor from '@/app/components/base/prompt-editor'
import { $createCustomTextNode } from '@/app/components/base/prompt-editor/plugins/custom-text/node'
@@ -68,6 +68,8 @@ export function AgentTaskField({
onOutputsChange: (outputs: DeclaredOutputConfig[], prompt?: string) => void
onEditOutput?: (name: string, outputType: AgentOutputTypeOptionValue) => void
}) {
+ const taskLabelId = useId()
+
const { t } = useTranslation()
const docLink = useDocLink()
const getVarType = useWorkflowVariableType()
@@ -94,16 +96,15 @@ export function AgentTaskField({
return (
<Field name="agent_task" className="gap-1 px-4 py-2">
<div className="flex h-6 items-center gap-1">
- <FieldLabel className="min-w-0 py-1 system-sm-semibold-uppercase! text-text-secondary">
+ <FieldLabel
+ id={taskLabelId}
+ className="min-w-0 py-1 system-sm-semibold-uppercase! text-text-secondary"
+ >
{t(($) => $[`${i18nPrefix}.task.label`], { ns: 'workflow' })}
</FieldLabel>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.task.tooltip`], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.task.tooltip`], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={taskLabelId} />
+ <InfotipContent aria-labelledby={taskLabelId}>
{t(($) => $[`${i18nPrefix}.task.tooltip`], { ns: 'workflow' })}{' '}
<a
href={docLink('/use-dify/nodes/agent#give-it-a-task')}
diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx
index a4f73512892..d3c54295ae6 100644
--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx
+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx
@@ -32,6 +32,8 @@ const DeliveryMethodForm: React.FC<Props> = ({
onChange,
readonly,
}) => {
+ const deliveryLabelId = React.useId()
+
const { t } = useTranslation()
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
@@ -63,16 +65,12 @@ const DeliveryMethodForm: React.FC<Props> = ({
<div className="px-4 py-2">
<div className="mb-1 flex items-center justify-between">
<div className="flex items-center gap-0.5">
- <div className="system-sm-semibold-uppercase text-text-secondary">
+ <div id={deliveryLabelId} className="system-sm-semibold-uppercase text-text-secondary">
{t(($) => $[`${i18nPrefix}.deliveryMethod.title`], { ns: 'workflow' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.deliveryMethod.tooltip`], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.deliveryMethod.tooltip`], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={deliveryLabelId} />
+ <InfotipContent aria-labelledby={deliveryLabelId}>
{t(($) => $[`${i18nPrefix}.deliveryMethod.tooltip`], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/human-input/panel.tsx b/web/app/components/workflow/nodes/human-input/panel.tsx
index df220f34fdb..4c8f5cc3a6b 100644
--- a/web/app/components/workflow/nodes/human-input/panel.tsx
+++ b/web/app/components/workflow/nodes/human-input/panel.tsx
@@ -42,6 +42,9 @@ const getOutputVarType = (input: FormInputItem): VarType => {
}
const Panel: FC<NodePanelProps<HumanInputNodeType>> = ({ id, data }) => {
+ const actionsLabelId = React.useId()
+ const formContentLabelId = React.useId()
+
const { t } = useTranslation()
const {
readOnly,
@@ -117,16 +120,15 @@ const Panel: FC<NodePanelProps<HumanInputNodeType>> = ({ id, data }) => {
>
<div className="mb-1 flex shrink-0 items-center justify-between">
<div className="flex h-6 items-center gap-0.5">
- <div className="system-sm-semibold-uppercase text-text-secondary">
+ <div
+ id={formContentLabelId}
+ className="system-sm-semibold-uppercase text-text-secondary"
+ >
{t(($) => $[`${i18nPrefix}.formContent.title`], { ns: 'workflow' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.formContent.tooltip`], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.formContent.tooltip`], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={formContentLabelId} />
+ <InfotipContent aria-labelledby={formContentLabelId}>
{t(($) => $[`${i18nPrefix}.formContent.tooltip`], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
@@ -200,16 +202,12 @@ const Panel: FC<NodePanelProps<HumanInputNodeType>> = ({ id, data }) => {
<div className="px-4 py-2">
<div className="mb-1 flex items-center justify-between">
<div className="flex items-center gap-0.5">
- <div className="system-sm-semibold-uppercase text-text-secondary">
+ <div id={actionsLabelId} className="system-sm-semibold-uppercase text-text-secondary">
{t(($) => $[`${i18nPrefix}.userActions.title`], { ns: 'workflow' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.userActions.tooltip`], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.userActions.tooltip`], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={actionsLabelId} />
+ <InfotipContent aria-labelledby={actionsLabelId}>
{t(($) => $[`${i18nPrefix}.userActions.tooltip`], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx
index bdcf6c394d1..d83b3c16ac5 100644
--- a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx
+++ b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx
@@ -1,6 +1,5 @@
import { cn } from '@langgenius/dify-ui/cn'
import { Fieldset, FieldsetLegend } from '@langgenius/dify-ui/fieldset'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import {
NumberField,
NumberFieldControls,
@@ -120,12 +119,6 @@ const IndexMethod = ({
>
{keywordNumberLabel}
</label>
- <Infotip>
- <InfotipTrigger aria-label={keywordNumberLabel} className="ml-0.5 size-3.5" />
- <InfotipContent aria-label={keywordNumberLabel}>
- {keywordNumberLabel}
- </InfotipContent>
- </Infotip>
</div>
<Slider
disabled={readonly}
diff --git a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx
index e717c37582f..bb78be91306 100644
--- a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx
+++ b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx
@@ -9,6 +9,7 @@ import { Fieldset, FieldsetLegend } from '@langgenius/dify-ui/fieldset'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { RadioControl, RadioGroup, RadioItem } from '@langgenius/dify-ui/radio-group'
import { Switch } from '@langgenius/dify-ui/switch'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import WeightedScoreComponent from '@/app/components/app/configuration/dataset-config/params-config/weighted-score'
import Badge from '@/app/components/base/badge'
@@ -235,6 +236,8 @@ export function SearchMethodOption({
reranking,
retrievalParameters,
}: SearchMethodOptionProps) {
+ const rerankLabelId = useId()
+
const { t } = useTranslation()
const isHybridSearch = option.id === RetrievalSearchMethodEnum.hybrid
const isHybridSearchWeightedScoreMode = hybridSearch.mode === HybridSearchModeEnum.WeightedScore
@@ -287,14 +290,16 @@ export function SearchMethodOption({
onCheckedChange={reranking.onEnabledChange}
disabled={readonly}
/>
- <span className="truncate">{rerankModelLabel}</span>
+ <span id={rerankLabelId} className="truncate">
+ {rerankModelLabel}
+ </span>
</FieldLabel>
<Infotip>
<InfotipTrigger
- aria-label={rerankModelTip}
+ aria-labelledby={rerankLabelId}
className="ml-0.5 size-3.5 shrink-0"
/>
- <InfotipContent aria-label={rerankModelTip}>{rerankModelTip}</InfotipContent>
+ <InfotipContent aria-labelledby={rerankLabelId}>{rerankModelTip}</InfotipContent>
</Infotip>
</div>
</Field>
diff --git a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx
index 2c6296cfe71..bbd3072c557 100644
--- a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx
+++ b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx
@@ -10,6 +10,7 @@ import {
NumberFieldInput,
} from '@langgenius/dify-ui/number-field'
import { Switch } from '@langgenius/dify-ui/switch'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { env } from '@/env'
@@ -54,6 +55,9 @@ export function TopKAndScoreThreshold({
scoreThreshold,
readonly,
}: TopKAndScoreThresholdProps) {
+ const scoreThresholdLabelId = useId()
+ const topKLabelId = useId()
+
const { t } = useTranslation()
const topKLabel = t(($) => $['datasetConfig.top_k'], { ns: 'appDebug' })
const scoreThresholdLabel = t(($) => $['datasetConfig.score_threshold'], { ns: 'appDebug' })
@@ -66,10 +70,12 @@ export function TopKAndScoreThreshold({
<div className="grid grid-cols-2 gap-4">
<Field name="top_k" className="gap-0">
<div className="mb-0.5 flex h-6 items-center">
- <FieldLabel className="py-0 system-xs-medium text-text-secondary">{topKLabel}</FieldLabel>
+ <FieldLabel id={topKLabelId} className="py-0 system-xs-medium text-text-secondary">
+ {topKLabel}
+ </FieldLabel>
<Infotip>
- <InfotipTrigger aria-label={topKTip} className="ml-0.5 size-3.5" />
- <InfotipContent aria-label={topKTip}>{topKTip}</InfotipContent>
+ <InfotipTrigger aria-labelledby={topKLabelId} className="ml-0.5 size-3.5" />
+ <InfotipContent aria-labelledby={topKLabelId}>{topKTip}</InfotipContent>
</Infotip>
</div>
<NumberField
@@ -101,11 +107,18 @@ export function TopKAndScoreThreshold({
onCheckedChange={scoreThreshold.onEnabledChange}
disabled={readonly}
/>
- <span className="grow truncate">{scoreThresholdLabel}</span>
+ <span id={scoreThresholdLabelId} className="grow truncate">
+ {scoreThresholdLabel}
+ </span>
</FieldLabel>
<Infotip>
- <InfotipTrigger aria-label={scoreThresholdTip} className="ml-0.5 size-3.5" />
- <InfotipContent aria-label={scoreThresholdTip}>{scoreThresholdTip}</InfotipContent>
+ <InfotipTrigger
+ aria-labelledby={scoreThresholdLabelId}
+ className="ml-0.5 size-3.5"
+ />
+ <InfotipContent aria-labelledby={scoreThresholdLabelId}>
+ {scoreThresholdTip}
+ </InfotipContent>
</Infotip>
</div>
</Field>
diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx
index 80cab1fd4ec..f8de2c47c29 100644
--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx
+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx
@@ -1,7 +1,7 @@
import type { MetadataShape } from '@/app/components/workflow/nodes/knowledge-retrieval/types'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { noop } from 'es-toolkit/function'
-import { useCallback, useState } from 'react'
+import { useCallback, useId, useState } from 'react'
import { useTranslation } from 'react-i18next'
import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'
import {
@@ -30,6 +30,8 @@ const MetadataFilter = ({
handleMetadataCompletionParamsChange,
...restProps
}: MetadataFilterProps) => {
+ const titleId = useId()
+
const { t } = useTranslation()
const [collapsed, setCollapsed] = useState(true)
@@ -54,18 +56,15 @@ const MetadataFilter = ({
<CollapseHeader>
<CollapseTrigger>
<CollapseTitle>
- {t(($) => $['nodes.knowledgeRetrieval.metadata.title'], { ns: 'workflow' })}
+ <span id={titleId}>
+ {t(($) => $['nodes.knowledgeRetrieval.metadata.title'], { ns: 'workflow' })}
+ </span>
</CollapseTitle>
{metadataFilterMode === MetadataFilteringModeEnum.automatic && <CollapseIndicator />}
</CollapseTrigger>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['nodes.knowledgeRetrieval.metadata.tip'], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $['nodes.knowledgeRetrieval.metadata.tip'], { ns: 'workflow' })}
- className="w-50"
- >
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId} className="w-50">
{t(($) => $['nodes.knowledgeRetrieval.metadata.tip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/llm/components/config-prompt-item.tsx b/web/app/components/workflow/nodes/llm/components/config-prompt-item.tsx
index 9820bfac36e..a6d5f86f5d0 100644
--- a/web/app/components/workflow/nodes/llm/components/config-prompt-item.tsx
+++ b/web/app/components/workflow/nodes/llm/components/config-prompt-item.tsx
@@ -126,10 +126,10 @@ const ConfigPromptItem: FC<Props> = ({
/>
)}
- {roleDescription && (
+ {roleDescription && payload.role && (
<Infotip>
- <InfotipTrigger aria-label={roleDescription} />
- <InfotipContent aria-label={roleDescription} className="w-45">
+ <InfotipTrigger aria-label={payload.role} />
+ <InfotipContent aria-label={payload.role} className="w-45">
{roleDescription}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx
index ffd2b783fe6..740a705e7b0 100644
--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx
+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx
@@ -36,6 +36,8 @@ const PromptEditor: FC<PromptEditorProps> = ({
onGenerate,
onModelChange,
}) => {
+ const instructionLabelId = React.useId()
+
const { t } = useTranslation()
const handleInstructionChange = useCallback(
@@ -82,15 +84,12 @@ const PromptEditor: FC<PromptEditorProps> = ({
</div>
<div className="flex flex-col gap-y-1 px-4 py-2">
<div className="flex h-6 items-center system-sm-semibold-uppercase text-text-secondary">
- <span>{t(($) => $['nodes.llm.jsonSchema.instruction'], { ns: 'workflow' })}</span>
+ <span id={instructionLabelId}>
+ {t(($) => $['nodes.llm.jsonSchema.instruction'], { ns: 'workflow' })}
+ </span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['nodes.llm.jsonSchema.promptTooltip'], { ns: 'workflow' })}
- className="size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $['nodes.llm.jsonSchema.promptTooltip'], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={instructionLabelId} className="size-3.5" />
+ <InfotipContent aria-labelledby={instructionLabelId}>
{t(($) => $['nodes.llm.jsonSchema.promptTooltip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx b/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx
index 9706b135664..229df4f7d87 100644
--- a/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx
+++ b/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx
@@ -55,6 +55,9 @@ const PanelMemorySection: FC<Props> = ({
handleSyeQueryChange,
handleMemoryChange,
}) => {
+ const userLabelId = React.useId()
+ const memoryLabelId = React.useId()
+
const { t } = useTranslation()
const isSnippetFlow = flowType === FlowType.snippet
const shouldCheckSysQuery = !isSnippetFlow
@@ -68,16 +71,15 @@ const PanelMemorySection: FC<Props> = ({
<div className="mt-4">
<div className="flex h-8 items-center justify-between rounded-lg bg-components-input-bg-normal pr-2 pl-3">
<div className="flex items-center space-x-1">
- <div className="text-xs font-semibold text-text-secondary uppercase">
+ <div
+ id={memoryLabelId}
+ className="text-xs font-semibold text-text-secondary uppercase"
+ >
{t(($) => $['nodes.common.memories.title'], { ns: 'workflow' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['nodes.common.memories.tip'], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $['nodes.common.memories.tip'], { ns: 'workflow' })}
- >
+ <InfotipTrigger aria-labelledby={memoryLabelId} />
+ <InfotipContent aria-labelledby={memoryLabelId}>
{t(($) => $['nodes.common.memories.tip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
@@ -90,15 +92,15 @@ const PanelMemorySection: FC<Props> = ({
<Editor
title={
<div className="flex items-center space-x-1">
- <div className="text-xs font-semibold text-text-secondary uppercase">user</div>
+ <div
+ id={userLabelId}
+ className="text-xs font-semibold text-text-secondary uppercase"
+ >
+ user
+ </div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['nodes.llm.roleDescription.user'], { ns: 'workflow' })}
- />
- <InfotipContent
- aria-label={t(($) => $['nodes.llm.roleDescription.user'], { ns: 'workflow' })}
- className="w-45"
- >
+ <InfotipTrigger aria-labelledby={userLabelId} />
+ <InfotipContent aria-labelledby={userLabelId} className="w-45">
{t(($) => $['nodes.llm.roleDescription.user'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx b/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx
index d9716f198e1..4216a1fe20f 100644
--- a/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx
+++ b/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx
@@ -1,6 +1,6 @@
import type { FC } from 'react'
import type { LLMNodeType, StructuredOutput } from '../types'
-import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
+import { Infotip, InfotipContent, InfotipTitle, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { Switch } from '@langgenius/dify-ui/switch'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
@@ -29,9 +29,9 @@ const PanelOutputSection: FC<Props> = ({
handleStructureOutputEnableChange,
handleStructureOutputChange,
}) => {
- const { t } = useTranslation()
- const warningTitleId = React.useId()
+ const structuredLabelId = React.useId()
+ const { t } = useTranslation()
return (
<>
<Split />
@@ -48,27 +48,25 @@ const PanelOutputSection: FC<Props> = ({
iconSize="large"
className="mr-1 text-text-warning-secondary"
/>
- <InfotipContent aria-labelledby={warningTitleId} className="w-58">
- <div id={warningTitleId} className="title-xs-semi-bold text-text-primary">
+ <InfotipContent className="w-58">
+ <InfotipTitle className="title-xs-semi-bold text-text-primary">
{t(($) => $['structOutput.modelNotSupported'], { ns: 'app' })}
- </div>
+ </InfotipTitle>
<div className="mt-1">
{t(($) => $['structOutput.modelNotSupportedTip'], { ns: 'app' })}
</div>
</InfotipContent>
</Infotip>
)}
- <div className="mr-0.5 system-xs-medium-uppercase text-text-tertiary">
+ <div
+ id={structuredLabelId}
+ className="mr-0.5 system-xs-medium-uppercase text-text-tertiary"
+ >
{t(($) => $['structOutput.structured'], { ns: 'app' })}
</div>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $['structOutput.structuredTip'], { ns: 'app' })}
- />
- <InfotipContent
- aria-label={t(($) => $['structOutput.structuredTip'], { ns: 'app' })}
- className="w-37.5"
- >
+ <InfotipTrigger aria-labelledby={structuredLabelId} />
+ <InfotipContent aria-labelledby={structuredLabelId} className="w-37.5">
{t(($) => $['structOutput.structuredTip'], { ns: 'app' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/parameter-extractor/panel.tsx b/web/app/components/workflow/nodes/parameter-extractor/panel.tsx
index d76225dae05..79d0f4ac531 100644
--- a/web/app/components/workflow/nodes/parameter-extractor/panel.tsx
+++ b/web/app/components/workflow/nodes/parameter-extractor/panel.tsx
@@ -24,6 +24,8 @@ const i18nPrefix = 'nodes.parameterExtractor'
const i18nCommonPrefix = 'common'
const Panel: FC<NodePanelProps<ParameterExtractorNodeType>> = ({ id, data }) => {
+ const instructionLabelId = React.useId()
+
const { t } = useTranslation()
const {
@@ -117,18 +119,12 @@ const Panel: FC<NodePanelProps<ParameterExtractorNodeType>> = ({ id, data }) =>
<Editor
title={
<div className="flex items-center space-x-1">
- <span className="uppercase">
+ <span id={instructionLabelId} className="uppercase">
{t(($) => $[`${i18nPrefix}.instruction`], { ns: 'workflow' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
- className="ml-0.5 size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
- className="w-30"
- >
+ <InfotipTrigger aria-labelledby={instructionLabelId} className="ml-0.5 size-3.5" />
+ <InfotipContent aria-labelledby={instructionLabelId} className="w-30">
{t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/question-classifier/components/advanced-setting.tsx b/web/app/components/workflow/nodes/question-classifier/components/advanced-setting.tsx
index f815e5f0a1d..ccc57d3b26e 100644
--- a/web/app/components/workflow/nodes/question-classifier/components/advanced-setting.tsx
+++ b/web/app/components/workflow/nodes/question-classifier/components/advanced-setting.tsx
@@ -40,6 +40,8 @@ const AdvancedSetting: FC<Props> = ({
nodesOutputVars,
availableNodes,
}) => {
+ const instructionLabelId = React.useId()
+
const { t } = useTranslation()
return (
@@ -47,18 +49,12 @@ const AdvancedSetting: FC<Props> = ({
<Editor
title={
<div className="flex items-center space-x-1">
- <span className="uppercase">
+ <span id={instructionLabelId} className="uppercase">
{t(($) => $[`${i18nPrefix}.instruction`], { ns: 'workflow' })}
</span>
<Infotip>
- <InfotipTrigger
- aria-label={t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
- className="ml-0.5 size-3.5"
- />
- <InfotipContent
- aria-label={t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
- className="w-30"
- >
+ <InfotipTrigger aria-labelledby={instructionLabelId} className="ml-0.5 size-3.5" />
+ <InfotipContent aria-labelledby={instructionLabelId} className="w-30">
{t(($) => $[`${i18nPrefix}.instructionTip`], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/tool/components/tool-form/__tests__/item.spec.tsx b/web/app/components/workflow/nodes/tool/components/tool-form/__tests__/item.spec.tsx
index fabcb93af5c..d35a387f646 100644
--- a/web/app/components/workflow/nodes/tool/components/tool-form/__tests__/item.spec.tsx
+++ b/web/app/components/workflow/nodes/tool/components/tool-form/__tests__/item.spec.tsx
@@ -126,7 +126,7 @@ describe('tool/tool-form/item', () => {
/>,
)
- const infotipTrigger = screen.getByRole('button', { name: 'Select from tools' })
+ const infotipTrigger = screen.getByRole('button', { name: 'Tool Config' })
fireEvent.click(infotipTrigger)
expect(screen.getByText('Select from tools'))!.toBeInTheDocument()
diff --git a/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx b/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx
index 753ff223825..2c1d10e54b2 100644
--- a/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx
+++ b/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx
@@ -105,8 +105,8 @@ const ToolFormItem: FC<Props> = ({
)}
{!showDescription && tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip[language] || tooltip.en_US} className="ml-1" />
- <InfotipContent aria-label={tooltip[language] || tooltip.en_US} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-1" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip[language] || tooltip.en_US}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx b/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx
index e175e6498da..54382ac837c 100644
--- a/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx
+++ b/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx
@@ -60,8 +60,8 @@ const TriggerFormItem: FC<Props> = ({
)}
{!showDescription && tooltip && (
<Infotip>
- <InfotipTrigger aria-label={tooltip[language] || tooltip.en_US} className="ml-1" />
- <InfotipContent aria-label={tooltip[language] || tooltip.en_US} className="w-50">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-1" />
+ <InfotipContent aria-labelledby={labelId} className="w-50">
{tooltip[language] || tooltip.en_US}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/nodes/trigger-schedule/components/monthly-days-selector.tsx b/web/app/components/workflow/nodes/trigger-schedule/components/monthly-days-selector.tsx
index 214f054be10..7215dd441f4 100644
--- a/web/app/components/workflow/nodes/trigger-schedule/components/monthly-days-selector.tsx
+++ b/web/app/components/workflow/nodes/trigger-schedule/components/monthly-days-selector.tsx
@@ -9,6 +9,8 @@ type MonthlyDaysSelectorProps = {
}
const MonthlyDaysSelector = ({ selectedDays, onChange }: MonthlyDaysSelectorProps) => {
+ const lastDayLabelId = React.useId()
+
const { t } = useTranslation()
const handleDayClick = (day: number | 'last') => {
@@ -49,6 +51,7 @@ const MonthlyDaysSelector = ({ selectedDays, onChange }: MonthlyDaysSelectorProp
}`}
>
<button
+ id={lastDayLabelId}
type="button"
onClick={() => handleDayClick(day)}
className="min-w-0 flex-1 py-1"
@@ -57,17 +60,11 @@ const MonthlyDaysSelector = ({ selectedDays, onChange }: MonthlyDaysSelectorProp
</button>
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['nodes.triggerSchedule.lastDayTooltip'], {
- ns: 'workflow',
- })}
+ aria-labelledby={lastDayLabelId}
className="mr-1 size-3"
iconSize="small"
/>
- <InfotipContent
- aria-label={t(($) => $['nodes.triggerSchedule.lastDayTooltip'], {
- ns: 'workflow',
- })}
- >
+ <InfotipContent aria-labelledby={lastDayLabelId}>
{t(($) => $['nodes.triggerSchedule.lastDayTooltip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx b/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx
index fbe216175da..3ffb5ccd41f 100644
--- a/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx
+++ b/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx
@@ -334,7 +334,7 @@ describe('VariableModal', () => {
expect(screen.queryByRole('button', { name: 'completion-model' })).not.toBeInTheDocument()
expect(screen.getByRole('button', { name: 'String' })).toBeDisabled()
expect(screen.getByRole('button', { name: 'Number' })).toBeDisabled()
- expect(screen.getByRole('button', { name: 'Secret' })).toBeDisabled()
+ expect(screen.getByRole('button', { name: 'Secret', pressed: false })).toBeDisabled()
expect(screen.getByRole('button', { name: 'workflow.blocks.llm' })).toBeEnabled()
act(() => {
diff --git a/web/app/components/workflow/panel/env-panel/variable-modal.tsx b/web/app/components/workflow/panel/env-panel/variable-modal.tsx
index fb1a64a298a..b02c89dd097 100644
--- a/web/app/components/workflow/panel/env-panel/variable-modal.tsx
+++ b/web/app/components/workflow/panel/env-panel/variable-modal.tsx
@@ -24,6 +24,8 @@ type ModalPropsType = {
}
const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
+ const secretLabelId = React.useId()
+
const { t } = useTranslation()
const workflowStore = useWorkflowStore()
const [type, setType] = React.useState<EnvironmentVariable['value_type']>('string')
@@ -187,6 +189,7 @@ const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
</button>
<div className="relative min-w-0">
<button
+ id={secretLabelId}
type="button"
aria-pressed={type === 'secret'}
disabled={isTypeChangeDisabled('secret')}
@@ -201,13 +204,10 @@ const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
</button>
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['env.modal.secretTip'], { ns: 'workflow' })}
+ aria-labelledby={secretLabelId}
className="absolute top-1/2 right-1 size-3.5 -translate-y-1/2"
/>
- <InfotipContent
- aria-label={t(($) => $['env.modal.secretTip'], { ns: 'workflow' })}
- className="w-60"
- >
+ <InfotipContent aria-labelledby={secretLabelId} className="w-60">
{t(($) => $['env.modal.secretTip'], { ns: 'workflow' })}
</InfotipContent>
</Infotip>
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/advanced/env.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/advanced/env.tsx
index 474601660a3..cd0f89dacac 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/advanced/env.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/advanced/env.tsx
@@ -485,7 +485,7 @@ export function AgentEnvEditor() {
const starterVariable = starterVariableRef.current
const [focusedVariable, setFocusedVariable] = useState<{ id: string; field: 'key' | 'value' }>()
const envImportInputRef = useRef<HTMLInputElement>(null)
- const envEditorTip = t(($) => $['agentDetail.configure.advancedSettings.envEditor.tip'])
+
const envImportTip = t(($) => $[envImportTipKeys[getCurrentEnvImportPlatform()]])
const envEditorTableId = 'agent-configure-env-editor-table'
const visibleEnvVariables = envVariables.length > 0 ? envVariables : [starterVariable]
@@ -544,7 +544,6 @@ export function AgentEnvEditor() {
headingLevel="h4"
panelId={envEditorTableId}
tip={<AgentConfigureTipContent type="env" />}
- tipAriaLabel={envEditorTip}
rootClassName="gap-1 py-3"
headerClassName="mb-0 gap-1 px-3"
panelContentClassName="px-3"
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/common/section.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/common/section.tsx
index 60500c0f3ee..d5f6deeb00b 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/common/section.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/common/section.tsx
@@ -8,7 +8,8 @@ import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/inf
import { AgentBuildDraftChangeDot } from '../build-draft-change-dot'
import { useIsAgentBuildDraftSectionChanged } from '../build-draft-changes-context'
-type ConfigureSectionBaseProps = {
+type ConfigureSectionProps = {
+ tip?: ReactNode
label: ReactNode
labelId: string
children: ReactNode
@@ -24,18 +25,6 @@ type ConfigureSectionBaseProps = {
panelContentClassName?: string
}
-type ConfigureSectionProps = ConfigureSectionBaseProps &
- (
- | {
- tip: ReactNode
- tipAriaLabel: string
- }
- | {
- tip?: undefined
- tipAriaLabel?: undefined
- }
- )
-
export function ConfigureSection({
label,
labelId,
@@ -47,7 +36,6 @@ export function ConfigureSection({
headingLevel = 'h3',
panelId,
tip,
- tipAriaLabel,
rootClassName,
headerClassName,
titleRowClassName,
@@ -68,16 +56,18 @@ export function ConfigureSection({
<div className={cn('mb-2 flex min-h-6 items-center gap-2', headerClassName)}>
<div className="min-w-0 flex-1">
<div className={cn('group/collapse-title flex min-w-0 items-center', titleRowClassName)}>
- <Heading id={labelId} className="relative min-w-0 shrink-0">
+ <Heading className="relative min-w-0 shrink-0">
{isBuildDraftChanged && <AgentBuildDraftChangeDot />}
<CollapsibleTrigger className="flex h-6 min-h-0 max-w-full touch-manipulation items-center justify-start gap-0 rounded-sm system-sm-medium text-text-secondary outline-hidden select-none focus-visible:ring-2 focus-visible:ring-state-accent-solid">
- <span className="min-w-0 truncate system-sm-semibold-uppercase">{label}</span>
+ <span id={labelId} className="min-w-0 truncate system-sm-semibold-uppercase">
+ {label}
+ </span>
</CollapsibleTrigger>
</Heading>
{hasTip && (
<Infotip>
- <InfotipTrigger aria-label={tipAriaLabel} className="ml-0.5 size-3.5" />
- <InfotipContent aria-label={tipAriaLabel} className="max-w-64">
+ <InfotipTrigger aria-labelledby={labelId} className="ml-0.5 size-3.5" />
+ <InfotipContent aria-labelledby={labelId} className="max-w-64">
{tip}
</InfotipContent>
</Infotip>
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/__tests__/index.spec.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/__tests__/index.spec.tsx
index 3483f7d00da..9516d33846f 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/__tests__/index.spec.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/__tests__/index.spec.tsx
@@ -710,7 +710,7 @@ describe('AgentFiles', () => {
await user.click(
within(buildNoteRow!).getByRole('button', {
- name: 'agentV2.agentDetail.configure.files.buildNote.tooltip',
+ name: 'build_note.md',
}),
)
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/index.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/index.tsx
index 431f24330bc..b6892860725 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/index.tsx
@@ -359,20 +359,16 @@ function AgentBuildNoteBadge() {
}
function AgentBuildNoteInfotip() {
- const { t } = useTranslation('agentV2')
const docLink = useDocLink()
return (
<Infotip>
<InfotipTrigger
- aria-label={t(($) => $['agentDetail.configure.files.buildNote.tooltip'])}
+ aria-label={BUILD_NOTE_FILE_NAME}
className="size-5 hover:text-text-quaternary"
iconSize="large"
/>
- <InfotipContent
- aria-label={t(($) => $['agentDetail.configure.files.buildNote.tooltip'])}
- className="w-57.5"
- >
+ <InfotipContent aria-label={BUILD_NOTE_FILE_NAME} className="w-57.5">
<Trans
i18nKey={($) => $['agentDetail.configure.files.buildNote.richTooltip']}
ns="agentV2"
@@ -387,7 +383,7 @@ function AgentBuildNoteInfotip() {
export function AgentFiles() {
const { t } = useTranslation('agentV2')
- const filesTip = t(($) => $['agentDetail.configure.files.tip'])
+
const filesTreeId = 'agent-configure-files-tree'
const readOnly = useAgentOrchestrateReadOnly()
const [isUploadOpen, setIsUploadOpen] = useState(false)
@@ -488,7 +484,6 @@ export function AgentFiles() {
labelId="agent-configure-files-label"
buildDraftChangeSection="files"
tip={<AgentConfigureTipContent type="files" />}
- tipAriaLabel={filesTip}
rootClassName="border-b border-divider-subtle pt-4"
panelContentClassName="pb-4"
actions={
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/knowledge/index.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/knowledge/index.tsx
index 655854ab165..c6bc9e82501 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/knowledge/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/knowledge/index.tsx
@@ -71,7 +71,7 @@ export function AgentKnowledgeRetrieval() {
const [addDialogName, setAddDialogName] = useState<string>()
const [editingRetrieval, setEditingRetrieval] = useState<AgentKnowledgeRetrievalItem | null>(null)
const addOptionsRef = useRef<AgentOrchestrateAddActionOptions | undefined>(undefined)
- const knowledgeRetrievalTip = t(($) => $['agentDetail.configure.knowledgeRetrieval.tip'])
+
const retrievalListId = 'agent-configure-knowledge-retrieval-list'
const isDialogOpen = isAddDialogOpen || !!editingRetrieval
const updateRetrieval = (nextRetrieval: AgentKnowledgeRetrievalItem) => {
@@ -105,7 +105,6 @@ export function AgentKnowledgeRetrieval() {
labelId="agent-configure-knowledge-retrieval-label"
panelId={retrievalListId}
tip={<AgentConfigureTipContent type="knowledge" />}
- tipAriaLabel={knowledgeRetrievalTip}
rootClassName="border-b border-divider-subtle pt-4"
panelContentClassName="flex flex-col gap-1 pb-4"
actions={
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/prompt-editor/index.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/prompt-editor/index.tsx
index 2319662d389..341ba877364 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/prompt-editor/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/prompt-editor/index.tsx
@@ -450,7 +450,7 @@ export function AgentPromptEditor() {
const { getConfiguredToolIcon } = useAgentPromptToolIconResolver()
const retrievals = useAtomValue(agentComposerKnowledgeRetrievalsAtom)
const addActions = useAgentOrchestrateAddActions()
- const promptTip = t(($) => $['agentDetail.configure.prompt.tip'])
+
const promptPlaceholder = (
<AgentPromptPlaceholder
text={t(($) => $['agentDetail.configure.prompt.placeholder'])}
@@ -1088,8 +1088,8 @@ export function AgentPromptEditor() {
{t(($) => $['agentDetail.configure.prompt.label'])}
</h3>
<Infotip>
- <InfotipTrigger aria-label={promptTip} />
- <InfotipContent aria-label={promptTip} className="max-w-64">
+ <InfotipTrigger aria-labelledby="agent-configure-prompt-label" />
+ <InfotipContent aria-labelledby="agent-configure-prompt-label" className="max-w-64">
<AgentConfigureTipContent type="prompt" />
</InfotipContent>
</Infotip>
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/index.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/index.tsx
index 7cf56deed03..dc84de0a7ab 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/index.tsx
@@ -457,7 +457,7 @@ export function AgentSkills() {
const { t } = useTranslation('agentV2')
const { t: tSkill } = useTranslation('skill')
const { t: tCommon } = useTranslation('common')
- const skillsTip = t(($) => $['agentDetail.configure.skills.tip'])
+
const skillsListId = 'agent-configure-skills-list'
const queryClient = useQueryClient()
const readOnly = useAgentOrchestrateReadOnly()
@@ -714,7 +714,6 @@ export function AgentSkills() {
buildDraftChangeSection="skills"
panelId={skillsListId}
tip={<AgentConfigureTipContent type="skills" />}
- tipAriaLabel={skillsTip}
rootClassName="border-b border-divider-subtle pt-4"
panelContentClassName="flex flex-col gap-1 pb-4"
actions={
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/index.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/index.tsx
index 810c142792e..ca5d0818275 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/index.tsx
@@ -512,7 +512,7 @@ export function AgentTools() {
'cli',
ENABLE_AGENT_CLI_TOOLS ? openCliToolDialogFromPrompt : () => {},
)
- const toolsTip = t(($) => $['agentDetail.configure.tools.tip'])
+
const toolsListId = 'agent-configure-tools-list'
const settingTargetTool = settingTarget
? tools.find((tool) => tool.kind === 'provider' && tool.id === settingTarget.toolId)
@@ -529,7 +529,6 @@ export function AgentTools() {
labelId="agent-configure-tools-label"
panelId={toolsListId}
tip={<AgentConfigureTipContent type="tools" />}
- tipAriaLabel={toolsTip}
rootClassName="border-b border-divider-subtle pt-4"
panelContentClassName="flex flex-col gap-1 pb-4"
actions={
diff --git a/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/working-directory-panel.spec.tsx b/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/working-directory-panel.spec.tsx
index 915a9c68e6c..b3b2d0dc2a5 100644
--- a/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/working-directory-panel.spec.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/working-directory-panel.spec.tsx
@@ -475,14 +475,14 @@ describe('AgentWorkingDirectoryPanel', () => {
await user.click(
await screen.findByRole('button', {
- name: persistentFilesTooltip,
+ name: 'agentV2.agentDetail.configure.workingDirectory.persistentFiles',
}),
)
expect(await screen.findByText(persistentFilesTooltip)).toBeInTheDocument()
await user.click(
screen.getByRole('button', {
- name: temporaryFilesTooltip,
+ name: 'agentV2.agentDetail.configure.workingDirectory.temporaryFiles',
}),
)
expect(await screen.findByText(temporaryFilesTooltip)).toBeInTheDocument()
diff --git a/web/features/agent-v2/agent-detail/configure/components/preview/working-directory-panel.tsx b/web/features/agent-v2/agent-detail/configure/components/preview/working-directory-panel.tsx
index a875f7fdf3e..ce6d1d7553f 100644
--- a/web/features/agent-v2/agent-detail/configure/components/preview/working-directory-panel.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/preview/working-directory-panel.tsx
@@ -15,7 +15,7 @@ import { Dialog } from '@langgenius/dify-ui/dialog'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import { Tabs, TabsIndicator, TabsList, TabsPanel, TabsTab } from '@langgenius/dify-ui/tabs'
import { skipToken, useMutation, useQueries, useQuery } from '@tanstack/react-query'
-import { useCallback, useState } from 'react'
+import { useCallback, useId, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from '@/app/notifications'
import { consoleClient, consoleQuery } from '@/service/console'
@@ -244,6 +244,9 @@ export function AgentWorkingDirectoryPanel({
onOpenChange,
open,
}: AgentWorkingDirectoryPanelProps) {
+ const temporaryFilesLabelId = useId()
+ const persistentFilesLabelId = useId()
+
const { t } = useTranslation('agentV2')
const { t: tCommon } = useTranslation('common')
const persistentFilesTooltip = t(
@@ -573,14 +576,16 @@ export function AgentWorkingDirectoryPanel({
value={AGENT_SAVED_FILES_ROOT_PATH}
className="h-full min-w-0 pt-0 pb-0 system-sm-semibold data-active:border-transparent"
>
- {t(($) => $['agentDetail.configure.workingDirectory.persistentFiles'])}
+ <span id={persistentFilesLabelId}>
+ {t(($) => $['agentDetail.configure.workingDirectory.persistentFiles'])}
+ </span>
</TabsTab>
<Infotip>
<InfotipTrigger
- aria-label={persistentFilesTooltip}
+ aria-labelledby={persistentFilesLabelId}
iconVariant="information"
/>
- <InfotipContent aria-label={persistentFilesTooltip} className="w-64">
+ <InfotipContent aria-labelledby={persistentFilesLabelId} className="w-64">
{persistentFilesTooltip}
</InfotipContent>
</Infotip>
@@ -590,14 +595,16 @@ export function AgentWorkingDirectoryPanel({
value={AGENT_TEMPORARY_FILES_ROOT_PATH}
className="h-full min-w-0 pt-0 pb-0 system-sm-semibold data-active:border-transparent"
>
- {t(($) => $['agentDetail.configure.workingDirectory.temporaryFiles'])}
+ <span id={temporaryFilesLabelId}>
+ {t(($) => $['agentDetail.configure.workingDirectory.temporaryFiles'])}
+ </span>
</TabsTab>
<Infotip>
<InfotipTrigger
- aria-label={temporaryFilesTooltip}
+ aria-labelledby={temporaryFilesLabelId}
iconVariant="information"
/>
- <InfotipContent aria-label={temporaryFilesTooltip} className="w-64">
+ <InfotipContent aria-labelledby={temporaryFilesLabelId} className="w-64">
{temporaryFilesTooltip}
</InfotipContent>
</Infotip>
diff --git a/web/features/agent-v2/agent-detail/monitoring/chart.tsx b/web/features/agent-v2/agent-detail/monitoring/chart.tsx
index 2b5a041f521..1a92b7cb3a9 100644
--- a/web/features/agent-v2/agent-detail/monitoring/chart.tsx
+++ b/web/features/agent-v2/agent-detail/monitoring/chart.tsx
@@ -4,6 +4,7 @@ import type { AgentMonitoringChartRow, AgentMonitoringChartType } from './chart-
import type { I18nKeysWithPrefix } from '@/types/i18n'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
import ReactECharts from 'echarts-for-react'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
import { buildChartOptions, getChartValueField, getTokenSummary } from './chart-utils'
@@ -32,6 +33,8 @@ export function AgentMonitoringChart({
unitKey,
yMaxWhenEmpty,
}: AgentMonitoringChartProps) {
+ const titleId = useId()
+
const { t } = useTranslation('agentV2')
const yField = getChartValueField(rows, valueKey)
const tokenSummary = getTokenSummary(rows)
@@ -48,14 +51,12 @@ export function AgentMonitoringChart({
<article className="flex h-79 w-full min-w-0 flex-col overflow-hidden rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg">
<div className="flex h-11 shrink-0 items-center px-6 pt-6 pb-1">
<div className="flex min-w-0 items-center gap-1">
- <h3 className="truncate system-md-semibold text-text-secondary">
+ <h3 id={titleId} className="truncate system-md-semibold text-text-secondary">
{t(($) => $[titleKey])}
</h3>
<Infotip>
- <InfotipTrigger aria-label={t(($) => $[explanationKey])} />
- <InfotipContent aria-label={t(($) => $[explanationKey])}>
- {t(($) => $[explanationKey])}
- </InfotipContent>
+ <InfotipTrigger aria-labelledby={titleId} />
+ <InfotipContent aria-labelledby={titleId}>{t(($) => $[explanationKey])}</InfotipContent>
</Infotip>
</div>
</div>
diff --git a/web/i18n/locales/ar-TN/agent-v-2.json b/web/i18n/locales/ar-TN/agent-v-2.json
index 3a38ba6669d..7685ccb042a 100644
--- a/web/i18n/locales/ar-TN/agent-v-2.json
+++ b/web/i18n/locales/ar-TN/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "إضافة ملف",
"agentDetail.configure.files.buildNote.generated": "تم إنشاؤه",
"agentDetail.configure.files.buildNote.richTooltip": "سجل الوكيل لما أعدّه في وضع Build. يقرأه في بداية كل محادثة إلى جانب Prompt الخاص بك. <docLink>معرفة المزيد</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "سجل الوكيل لما أعدّه في وضع Build. يقرأه في بداية كل محادثة إلى جانب Prompt الخاص بك. معرفة المزيد",
"agentDetail.configure.files.download": "تنزيل {{name}}",
"agentDetail.configure.files.empty.description": "قم بتحميل المستندات التي يمكن للوكيل قراءتها، مثل المواصفات أو القوالب أو الإرشادات",
"agentDetail.configure.files.empty.title": "لا توجد ملفات بعد",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "اكتب التعليمات هنا،",
"agentDetail.configure.prompt.referenceMissing": "{{name}} غير موجود",
"agentDetail.configure.prompt.richTip": "حدّد دور الوكيل وكيفية عمله. <docLink>تعرّف على المزيد</docLink>",
- "agentDetail.configure.prompt.tip": "حدّد دور الوكيل وكيفية عمله. تعرّف على المزيد",
"agentDetail.configure.publishBar.draft": "مسودة",
"agentDetail.configure.publishBar.publishUpdate": "نشر التحديث",
"agentDetail.configure.publishBar.published": "تم النشر",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "إزالة {{name}}",
"agentDetail.configure.tools.removeProvider": "إزالة جميع الأدوات",
"agentDetail.configure.tools.richTip": "أضف أدوات Dify من مساحة عملك. <docLink>معرفة المزيد</docLink>\n\nالأدوات التي يثبتها الوكيل في sandbox الخاص به لن تظهر هنا، لكنها ستبقى متاحة له.",
- "agentDetail.configure.tools.tip": "أضف أدوات Dify من مساحة عملك. معرفة المزيد\n\nالأدوات التي يثبتها الوكيل في sandbox الخاص به لن تظهر هنا، لكنها ستبقى متاحة له.",
"agentDetail.configure.tools.toolTabs.all": "الكل",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "مخصص",
diff --git a/web/i18n/locales/az-AZ/agent-v-2.json b/web/i18n/locales/az-AZ/agent-v-2.json
index 59607cbb2da..1496ccec970 100644
--- a/web/i18n/locales/az-AZ/agent-v-2.json
+++ b/web/i18n/locales/az-AZ/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Fayl əlavə et",
"agentDetail.configure.files.buildNote.generated": "Yaradılıb",
"agentDetail.configure.files.buildNote.richTooltip": "Agentin qurma rejimində konfiqurasiya etdikləri barədə qeydi. Hər söhbətin əvvəlində təlimatınızla yanaşı bunu da oxuyur. <docLink>Ətraflı öyrən</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Agentin qurma rejimində konfiqurasiya etdikləri barədə qeydi. Hər söhbətin əvvəlində təlimatınızla yanaşı bunu da oxuyur. Ətraflı öyrən",
"agentDetail.configure.files.download": "{{name}} faylını yüklə",
"agentDetail.configure.files.empty.description": "Agentin oxuya biləcəyi spesifikasiyalar, şablonlar və ya təlimatlar kimi sənədləri yükləyin",
"agentDetail.configure.files.empty.title": "Hələ fayl yoxdur",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Təlimatları buraya yazın,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} mövcud deyil",
"agentDetail.configure.prompt.richTip": "Agentin rolunu və necə işləməli olduğunu müəyyən edin. <docLink>Ətraflı öyrən</docLink>",
- "agentDetail.configure.prompt.tip": "Agentin rolunu və necə işləməli olduğunu müəyyən edin. Ətraflı öyrən",
"agentDetail.configure.publishBar.draft": "Qaralama",
"agentDetail.configure.publishBar.publishUpdate": "Yeniləməni dərc et",
"agentDetail.configure.publishBar.published": "Dərc edilib",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} alətini çıxar",
"agentDetail.configure.tools.removeProvider": "Bütün alətləri çıxar",
"agentDetail.configure.tools.richTip": "İş sahənizdən Dify alətləri əlavə edin. <docLink>Ətraflı öyrənin</docLink>\n\nAgentin təcrid olunmuş mühitində quraşdırdığı alətlər burada görünmür, lakin agent onlardan istifadə edə bilir.",
- "agentDetail.configure.tools.tip": "İş sahənizdən Dify alətləri əlavə edin. Ətraflı öyrənin\n\nAgentin təcrid olunmuş mühitində quraşdırdığı alətlər burada görünmür, lakin agent onlardan istifadə edə bilir.",
"agentDetail.configure.tools.toolTabs.all": "Hamısı",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Fərdi",
diff --git a/web/i18n/locales/de-DE/agent-v-2.json b/web/i18n/locales/de-DE/agent-v-2.json
index 916d16c9b8a..0603a793f4c 100644
--- a/web/i18n/locales/de-DE/agent-v-2.json
+++ b/web/i18n/locales/de-DE/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Datei hinzufügen",
"agentDetail.configure.files.buildNote.generated": "Generiert",
"agentDetail.configure.files.buildNote.richTooltip": "Die Aufzeichnung des Agenten darüber, was er im Build-Modus eingerichtet hat. Er liest sie zu Beginn jeder Unterhaltung zusammen mit Ihrem Prompt. <docLink>Mehr erfahren</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Die Aufzeichnung des Agenten darüber, was er im Build-Modus eingerichtet hat. Er liest sie zu Beginn jeder Unterhaltung zusammen mit Ihrem Prompt. Mehr erfahren",
"agentDetail.configure.files.download": "{{name}} herunterladen",
"agentDetail.configure.files.empty.description": "Laden Sie Dokumente hoch, die der Agent lesen kann, z. B. Spezifikationen, Vorlagen oder Richtlinien",
"agentDetail.configure.files.empty.title": "Noch keine Dateien",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Anweisungen hier eintragen,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} existiert nicht",
"agentDetail.configure.prompt.richTip": "Definieren Sie die Rolle des Agenten und wie er arbeiten soll. <docLink>Mehr erfahren</docLink>",
- "agentDetail.configure.prompt.tip": "Definieren Sie die Rolle des Agenten und wie er arbeiten soll. Mehr erfahren",
"agentDetail.configure.publishBar.draft": "Entwurf",
"agentDetail.configure.publishBar.publishUpdate": "Update veröffentlichen",
"agentDetail.configure.publishBar.published": "Veröffentlicht",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} entfernen",
"agentDetail.configure.tools.removeProvider": "Alle Tools entfernen",
"agentDetail.configure.tools.richTip": "Fügen Sie Dify-Tools aus Ihrem Workspace hinzu. <docLink>Mehr erfahren</docLink>\n\nTools, die der Agent in seiner Sandbox installiert, erscheinen hier nicht, bleiben ihm aber verfügbar.",
- "agentDetail.configure.tools.tip": "Fügen Sie Dify-Tools aus Ihrem Workspace hinzu. Mehr erfahren\n\nTools, die der Agent in seiner Sandbox installiert, erscheinen hier nicht, bleiben ihm aber verfügbar.",
"agentDetail.configure.tools.toolTabs.all": "Alle",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Benutzerdefiniert",
diff --git a/web/i18n/locales/en-US/agent-v-2.json b/web/i18n/locales/en-US/agent-v-2.json
index 0b8c720497a..af88434dfeb 100644
--- a/web/i18n/locales/en-US/agent-v-2.json
+++ b/web/i18n/locales/en-US/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Add file",
"agentDetail.configure.files.buildNote.generated": "Generated",
"agentDetail.configure.files.buildNote.richTooltip": "The agent's record of what it set up in Build mode. It reads this at the start of every conversation, alongside your Prompt. <docLink>Learn more</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "The agent's record of what it set up in Build mode. It reads this at the start of every conversation, alongside your Prompt. Learn more",
"agentDetail.configure.files.download": "Download {{name}}",
"agentDetail.configure.files.empty.description": "Upload docs the agent can read, like specs, templates, or guidelines",
"agentDetail.configure.files.empty.title": "No files yet",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Write instructions here,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} does not exist",
"agentDetail.configure.prompt.richTip": "Define the agent's role and how it should work. <docLink>Learn more</docLink>",
- "agentDetail.configure.prompt.tip": "Define the agent's role and how it should work. Learn more",
"agentDetail.configure.publishBar.draft": "Draft",
"agentDetail.configure.publishBar.publishUpdate": "Publish update",
"agentDetail.configure.publishBar.published": "Published",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Remove {{name}}",
"agentDetail.configure.tools.removeProvider": "Remove all tools",
"agentDetail.configure.tools.richTip": "Add Dify tools from your workspace. <docLink>Learn more</docLink>\n\nTools the agent installs in its sandbox won't appear here but stay available to it.",
- "agentDetail.configure.tools.tip": "Add Dify tools from your workspace. Learn more\n\nTools the agent installs in its sandbox won't appear here but stay available to it.",
"agentDetail.configure.tools.toolTabs.all": "All",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Custom",
diff --git a/web/i18n/locales/es-ES/agent-v-2.json b/web/i18n/locales/es-ES/agent-v-2.json
index a89c89fb4ec..2d4974b697e 100644
--- a/web/i18n/locales/es-ES/agent-v-2.json
+++ b/web/i18n/locales/es-ES/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Agregar archivo",
"agentDetail.configure.files.buildNote.generated": "Generado",
"agentDetail.configure.files.buildNote.richTooltip": "El registro del agente sobre lo que configuró en modo Build. Lo lee al inicio de cada conversación, junto con tu Prompt. <docLink>Más información</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "El registro del agente sobre lo que configuró en modo Build. Lo lee al inicio de cada conversación, junto con tu Prompt. Más información",
"agentDetail.configure.files.download": "Descargar {{name}}",
"agentDetail.configure.files.empty.description": "Sube documentos que el agente pueda leer, como especificaciones, plantillas o guías",
"agentDetail.configure.files.empty.title": "Aún no hay archivos",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Escribe las instrucciones aquí,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} no existe",
"agentDetail.configure.prompt.richTip": "Define el rol del agente y cómo debe trabajar. <docLink>Más información</docLink>",
- "agentDetail.configure.prompt.tip": "Define el rol del agente y cómo debe trabajar. Más información",
"agentDetail.configure.publishBar.draft": "Borrador",
"agentDetail.configure.publishBar.publishUpdate": "Publicar actualización",
"agentDetail.configure.publishBar.published": "Publicado",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Eliminar {{name}}",
"agentDetail.configure.tools.removeProvider": "Eliminar todas las herramientas",
"agentDetail.configure.tools.richTip": "Añade herramientas de Dify desde tu espacio de trabajo. <docLink>Más información</docLink>\n\nLas herramientas que el agente instale en su sandbox no aparecerán aquí, pero seguirán disponibles para él.",
- "agentDetail.configure.tools.tip": "Añade herramientas de Dify desde tu espacio de trabajo. Más información\n\nLas herramientas que el agente instale en su sandbox no aparecerán aquí, pero seguirán disponibles para él.",
"agentDetail.configure.tools.toolTabs.all": "Todas",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Personalizado",
diff --git a/web/i18n/locales/fa-IR/agent-v-2.json b/web/i18n/locales/fa-IR/agent-v-2.json
index 6b23e1cbd20..e3bd3e10c43 100644
--- a/web/i18n/locales/fa-IR/agent-v-2.json
+++ b/web/i18n/locales/fa-IR/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "افزودن فایل",
"agentDetail.configure.files.buildNote.generated": "تولید شده",
"agentDetail.configure.files.buildNote.richTooltip": "رکورد عامل از چیزهایی که در حالت Build تنظیم کرده است. در آغاز هر گفتگو، آن را همراه با Prompt شما می‌خواند. <docLink>بیشتر بدانید</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "رکورد عامل از چیزهایی که در حالت Build تنظیم کرده است. در آغاز هر گفتگو، آن را همراه با Prompt شما می‌خواند. بیشتر بدانید",
"agentDetail.configure.files.download": "دانلود {{name}}",
"agentDetail.configure.files.empty.description": "اسنادی را که عامل می‌تواند بخواند بارگذاری کنید، مانند مشخصات، قالب‌ها یا دستورالعمل‌ها",
"agentDetail.configure.files.empty.title": "هنوز فایلی وجود ندارد",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "دستورالعمل‌ها را اینجا بنویسید،",
"agentDetail.configure.prompt.referenceMissing": "{{name}} وجود ندارد",
"agentDetail.configure.prompt.richTip": "نقش عامل و نحوه کار آن را تعریف کنید. <docLink>بیشتر بدانید</docLink>",
- "agentDetail.configure.prompt.tip": "نقش عامل و نحوه کار آن را تعریف کنید. بیشتر بدانید",
"agentDetail.configure.publishBar.draft": "پیش‌نویس",
"agentDetail.configure.publishBar.publishUpdate": "انتشار به‌روزرسانی",
"agentDetail.configure.publishBar.published": "منتشر شد",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "حذف {{name}}",
"agentDetail.configure.tools.removeProvider": "حذف همه ابزارها",
"agentDetail.configure.tools.richTip": "ابزارهای Dify را از workspace خود اضافه کنید. <docLink>بیشتر بدانید</docLink>\n\nابزارهایی که عامل در sandbox خود نصب می‌کند اینجا نمایش داده نمی‌شوند، اما برای او در دسترس می‌مانند.",
- "agentDetail.configure.tools.tip": "ابزارهای Dify را از workspace خود اضافه کنید. بیشتر بدانید\n\nابزارهایی که عامل در sandbox خود نصب می‌کند اینجا نمایش داده نمی‌شوند، اما برای او در دسترس می‌مانند.",
"agentDetail.configure.tools.toolTabs.all": "همه",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "سفارشی",
diff --git a/web/i18n/locales/fr-FR/agent-v-2.json b/web/i18n/locales/fr-FR/agent-v-2.json
index 8f5a944587e..4694d11bbb1 100644
--- a/web/i18n/locales/fr-FR/agent-v-2.json
+++ b/web/i18n/locales/fr-FR/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Ajouter un fichier",
"agentDetail.configure.files.buildNote.generated": "Généré",
"agentDetail.configure.files.buildNote.richTooltip": "Le registre de l'agent sur ce qu'il a configuré en mode Build. Il le lit au début de chaque conversation, avec votre Prompt. <docLink>En savoir plus</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Le registre de l'agent sur ce qu'il a configuré en mode Build. Il le lit au début de chaque conversation, avec votre Prompt. En savoir plus",
"agentDetail.configure.files.download": "Télécharger {{name}}",
"agentDetail.configure.files.empty.description": "Téléchargez des documents que l’agent peut lire, comme des spécifications, des modèles ou des directives",
"agentDetail.configure.files.empty.title": "Pas encore de fichiers",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Écrivez les instructions ici,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} n’existe pas",
"agentDetail.configure.prompt.richTip": "Définissez le rôle de l’agent et la manière dont il doit travailler. <docLink>En savoir plus</docLink>",
- "agentDetail.configure.prompt.tip": "Définissez le rôle de l’agent et la manière dont il doit travailler. En savoir plus",
"agentDetail.configure.publishBar.draft": "Brouillon",
"agentDetail.configure.publishBar.publishUpdate": "Publier la mise à jour",
"agentDetail.configure.publishBar.published": "Publié",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Supprimer {{name}}",
"agentDetail.configure.tools.removeProvider": "Supprimer tous les outils",
"agentDetail.configure.tools.richTip": "Ajoutez les outils Dify de votre espace de travail. <docLink>En savoir plus</docLink>\n\nLes outils que l'agent installe dans son sandbox n'apparaîtront pas ici, mais resteront disponibles.",
- "agentDetail.configure.tools.tip": "Ajoutez les outils Dify de votre espace de travail. En savoir plus\n\nLes outils que l'agent installe dans son sandbox n'apparaîtront pas ici, mais resteront disponibles.",
"agentDetail.configure.tools.toolTabs.all": "Tous",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Personnalisé",
diff --git a/web/i18n/locales/hi-IN/agent-v-2.json b/web/i18n/locales/hi-IN/agent-v-2.json
index 72f04c1a807..20a57f4700f 100644
--- a/web/i18n/locales/hi-IN/agent-v-2.json
+++ b/web/i18n/locales/hi-IN/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "फ़ाइल जोड़ें",
"agentDetail.configure.files.buildNote.generated": "जनरेट किया गया",
"agentDetail.configure.files.buildNote.richTooltip": "Build mode में एजेंट ने जो सेट अप किया उसका रिकॉर्ड। हर बातचीत की शुरुआत में यह इसे आपके Prompt के साथ पढ़ता है। <docLink>और जानें</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Build mode में एजेंट ने जो सेट अप किया उसका रिकॉर्ड। हर बातचीत की शुरुआत में यह इसे आपके Prompt के साथ पढ़ता है। और जानें",
"agentDetail.configure.files.download": "{{name}} डाउनलोड करें",
"agentDetail.configure.files.empty.description": "ऐसे दस्तावेज़ अपलोड करें जिन्हें एजेंट पढ़ सके, जैसे विनिर्देश, टेम्पलेट या दिशानिर्देश",
"agentDetail.configure.files.empty.title": "अभी तक कोई फ़ाइल नहीं",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "यहाँ निर्देश लिखें,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} मौजूद नहीं है",
"agentDetail.configure.prompt.richTip": "एजेंट की भूमिका और उसके काम करने के तरीके को तय करें। <docLink>ज़्यादा जानें</docLink>",
- "agentDetail.configure.prompt.tip": "एजेंट की भूमिका और उसके काम करने के तरीके को तय करें। ज़्यादा जानें",
"agentDetail.configure.publishBar.draft": "ड्राफ्ट",
"agentDetail.configure.publishBar.publishUpdate": "अपडेट प्रकाशित करें",
"agentDetail.configure.publishBar.published": "प्रकाशित",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} हटाएँ",
"agentDetail.configure.tools.removeProvider": "सभी उपकरण हटाएँ",
"agentDetail.configure.tools.richTip": "अपने workspace से Dify tools जोड़ें। <docLink>और जानें</docLink>\n\nएजेंट अपने sandbox में जो tools इंस्टॉल करता है वे यहां दिखाई नहीं देंगे, लेकिन उसके लिए उपलब्ध रहेंगे।",
- "agentDetail.configure.tools.tip": "अपने workspace से Dify tools जोड़ें। और जानें\n\nएजेंट अपने sandbox में जो tools इंस्टॉल करता है वे यहां दिखाई नहीं देंगे, लेकिन उसके लिए उपलब्ध रहेंगे।",
"agentDetail.configure.tools.toolTabs.all": "सभी",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "कस्टम",
diff --git a/web/i18n/locales/id-ID/agent-v-2.json b/web/i18n/locales/id-ID/agent-v-2.json
index 978c40e1b71..709a7a5bd09 100644
--- a/web/i18n/locales/id-ID/agent-v-2.json
+++ b/web/i18n/locales/id-ID/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Tambahkan file",
"agentDetail.configure.files.buildNote.generated": "Dihasilkan",
"agentDetail.configure.files.buildNote.richTooltip": "Catatan agen tentang apa yang disiapkannya dalam mode Build. Agen membaca ini di awal setiap percakapan, bersama Prompt Anda. <docLink>Pelajari selengkapnya</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Catatan agen tentang apa yang disiapkannya dalam mode Build. Agen membaca ini di awal setiap percakapan, bersama Prompt Anda. Pelajari selengkapnya",
"agentDetail.configure.files.download": "Unduh {{name}}",
"agentDetail.configure.files.empty.description": "Unggah dokumen yang dapat dibaca agen, seperti spesifikasi, templat, atau pedoman",
"agentDetail.configure.files.empty.title": "Belum ada file",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Tulis instruksi di sini,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} tidak ada",
"agentDetail.configure.prompt.richTip": "Tentukan peran agen dan cara kerjanya. <docLink>Pelajari selengkapnya</docLink>",
- "agentDetail.configure.prompt.tip": "Tentukan peran agen dan cara kerjanya. Pelajari selengkapnya",
"agentDetail.configure.publishBar.draft": "Draf",
"agentDetail.configure.publishBar.publishUpdate": "Terbitkan pembaruan",
"agentDetail.configure.publishBar.published": "Diterbitkan",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Hapus {{name}}",
"agentDetail.configure.tools.removeProvider": "Hapus semua alat",
"agentDetail.configure.tools.richTip": "Tambahkan Dify tools dari workspace Anda. <docLink>Pelajari selengkapnya</docLink>\n\nTools yang diinstal agen di sandbox-nya tidak akan muncul di sini, tetapi tetap tersedia baginya.",
- "agentDetail.configure.tools.tip": "Tambahkan Dify tools dari workspace Anda. Pelajari selengkapnya\n\nTools yang diinstal agen di sandbox-nya tidak akan muncul di sini, tetapi tetap tersedia baginya.",
"agentDetail.configure.tools.toolTabs.all": "Semua",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Kustom",
diff --git a/web/i18n/locales/it-IT/agent-v-2.json b/web/i18n/locales/it-IT/agent-v-2.json
index 9300cbc12d9..f40706e4aaa 100644
--- a/web/i18n/locales/it-IT/agent-v-2.json
+++ b/web/i18n/locales/it-IT/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Aggiungi file",
"agentDetail.configure.files.buildNote.generated": "Generato",
"agentDetail.configure.files.buildNote.richTooltip": "Il registro dell'agente di ciò che ha configurato in modalità Build. Lo legge all'inizio di ogni conversazione, insieme al tuo Prompt. <docLink>Scopri di più</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Il registro dell'agente di ciò che ha configurato in modalità Build. Lo legge all'inizio di ogni conversazione, insieme al tuo Prompt. Scopri di più",
"agentDetail.configure.files.download": "Scarica {{name}}",
"agentDetail.configure.files.empty.description": "Carica documenti che l’agente possa leggere, come specifiche, modelli o linee guida",
"agentDetail.configure.files.empty.title": "Nessun file al momento",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Scrivi le istruzioni qui,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} non esiste",
"agentDetail.configure.prompt.richTip": "Definisci il ruolo dell’agente e il modo in cui deve lavorare. <docLink>Scopri di più</docLink>",
- "agentDetail.configure.prompt.tip": "Definisci il ruolo dell’agente e il modo in cui deve lavorare. Scopri di più",
"agentDetail.configure.publishBar.draft": "Bozza",
"agentDetail.configure.publishBar.publishUpdate": "Pubblica aggiornamento",
"agentDetail.configure.publishBar.published": "Pubblicato",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Rimuovi {{name}}",
"agentDetail.configure.tools.removeProvider": "Rimuovi tutti gli strumenti",
"agentDetail.configure.tools.richTip": "Aggiungi strumenti Dify dal tuo workspace. <docLink>Scopri di più</docLink>\n\nGli strumenti che l'agente installa nel suo sandbox non appariranno qui, ma resteranno disponibili.",
- "agentDetail.configure.tools.tip": "Aggiungi strumenti Dify dal tuo workspace. Scopri di più\n\nGli strumenti che l'agente installa nel suo sandbox non appariranno qui, ma resteranno disponibili.",
"agentDetail.configure.tools.toolTabs.all": "Tutti",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Personalizzato",
diff --git a/web/i18n/locales/ja-JP/agent-v-2.json b/web/i18n/locales/ja-JP/agent-v-2.json
index 13da143af95..36dc9f28c83 100644
--- a/web/i18n/locales/ja-JP/agent-v-2.json
+++ b/web/i18n/locales/ja-JP/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "ファイルを追加",
"agentDetail.configure.files.buildNote.generated": "生成済み",
"agentDetail.configure.files.buildNote.richTooltip": "Build モードでエージェントが設定した内容の記録です。各会話の開始時に、Prompt と一緒にこれを読み取ります。<docLink>詳しく見る</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Build モードでエージェントが設定した内容の記録です。各会話の開始時に、Prompt と一緒にこれを読み取ります。詳しく見る",
"agentDetail.configure.files.download": "{{name}} をダウンロード",
"agentDetail.configure.files.empty.description": "仕様、テンプレート、ガイドラインなど、エージェントが読めるドキュメントをアップロード",
"agentDetail.configure.files.empty.title": "ファイルはまだありません",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "ここに指示を記述してください、",
"agentDetail.configure.prompt.referenceMissing": "{{name}} は存在しません",
"agentDetail.configure.prompt.richTip": "Agent のロールと仕事の進め方を設定します。<docLink>詳細を見る</docLink>",
- "agentDetail.configure.prompt.tip": "Agent のロールと仕事の進め方を設定します。詳細を見る",
"agentDetail.configure.publishBar.draft": "ドラフト",
"agentDetail.configure.publishBar.publishUpdate": "更新を公開",
"agentDetail.configure.publishBar.published": "公開済み",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} を削除",
"agentDetail.configure.tools.removeProvider": "すべてのツールを削除",
"agentDetail.configure.tools.richTip": "ワークスペースの Dify ツールを追加します。<docLink>詳しく見る</docLink>\n\nエージェントがサンドボックス内にインストールしたツールはここには表示されませんが、引き続き利用できます。",
- "agentDetail.configure.tools.tip": "ワークスペースの Dify ツールを追加します。詳しく見る\n\nエージェントがサンドボックス内にインストールしたツールはここには表示されませんが、引き続き利用できます。",
"agentDetail.configure.tools.toolTabs.all": "すべて",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "カスタム",
diff --git a/web/i18n/locales/ko-KR/agent-v-2.json b/web/i18n/locales/ko-KR/agent-v-2.json
index b54d223f4dc..d381293bbdb 100644
--- a/web/i18n/locales/ko-KR/agent-v-2.json
+++ b/web/i18n/locales/ko-KR/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "파일 추가",
"agentDetail.configure.files.buildNote.generated": "생성됨",
"agentDetail.configure.files.buildNote.richTooltip": "에이전트가 Build mode에서 설정한 내용의 기록입니다. 모든 대화 시작 시 Prompt와 함께 이 기록을 읽습니다. <docLink>자세히 알아보기</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "에이전트가 Build mode에서 설정한 내용의 기록입니다. 모든 대화 시작 시 Prompt와 함께 이 기록을 읽습니다. 자세히 알아보기",
"agentDetail.configure.files.download": "{{name}} 다운로드",
"agentDetail.configure.files.empty.description": "사양, 템플릿, 가이드라인 등 에이전트가 읽을 수 있는 문서를 업로드하세요",
"agentDetail.configure.files.empty.title": "아직 파일이 없습니다",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "여기에 지시 사항을 작성하세요,",
"agentDetail.configure.prompt.referenceMissing": "{{name}}이(가) 존재하지 않습니다",
"agentDetail.configure.prompt.richTip": "에이전트의 역할과 작업 방식을 정의합니다. <docLink>자세히 알아보기</docLink>",
- "agentDetail.configure.prompt.tip": "에이전트의 역할과 작업 방식을 정의합니다. 자세히 알아보기",
"agentDetail.configure.publishBar.draft": "초안",
"agentDetail.configure.publishBar.publishUpdate": "업데이트 게시",
"agentDetail.configure.publishBar.published": "게시됨",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} 제거",
"agentDetail.configure.tools.removeProvider": "모든 도구 제거",
"agentDetail.configure.tools.richTip": "워크스페이스의 Dify 도구를 추가하세요. <docLink>자세히 알아보기</docLink>\n\n에이전트가 sandbox에 설치한 도구는 여기에 표시되지 않지만 계속 사용할 수 있습니다.",
- "agentDetail.configure.tools.tip": "워크스페이스의 Dify 도구를 추가하세요. 자세히 알아보기\n\n에이전트가 sandbox에 설치한 도구는 여기에 표시되지 않지만 계속 사용할 수 있습니다.",
"agentDetail.configure.tools.toolTabs.all": "전체",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "사용자 지정",
diff --git a/web/i18n/locales/lo-LA/agent-v-2.json b/web/i18n/locales/lo-LA/agent-v-2.json
index 54a9f53c4d8..e6abdc7748e 100644
--- a/web/i18n/locales/lo-LA/agent-v-2.json
+++ b/web/i18n/locales/lo-LA/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "ເພີ່ມໄຟລ໌",
"agentDetail.configure.files.buildNote.generated": "ສ້າງຂຶ້ນແລ້ວ",
"agentDetail.configure.files.buildNote.richTooltip": "ບັນທຶກຂອງຕົວແທນກ່ຽວກັບສິ່ງທີ່ມັນຕັ້ງຄ່າໃນໂໝດສ້າງ. ມັນຈະອ່ານສິ່ງນີ້ໃນຕອນເລີ່ມຕົ້ນຂອງທຸກການສົນທະນາ ພ້ອມກັບ Prompt ຂອງທ່ານ. <docLink>ຮຽນຮູ້ເພີ່ມເຕີມ</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "ບັນທຶກຂອງຕົວແທນກ່ຽວກັບສິ່ງທີ່ມັນຕັ້ງຄ່າໃນໂໝດສ້າງ. ມັນຈະອ່ານສິ່ງນີ້ໃນຕອນເລີ່ມຕົ້ນຂອງທຸກການສົນທະນາ ພ້ອມກັບ Prompt ຂອງທ່ານ. ຮຽນຮູ້ເພີ່ມເຕີມ",
"agentDetail.configure.files.download": "ດາວໂຫຼດ {{name}}",
"agentDetail.configure.files.empty.description": "ອັບໂຫຼດເອກະສານທີ່ຕົວແທນສາມາດອ່ານໄດ້ ເຊັ່ນ: ຂໍ້ກຳນົດ, ເທມເພຼດ ຫຼື ຄຳແນະນຳ",
"agentDetail.configure.files.empty.title": "ຍັງບໍ່ມີໄຟລ໌ເທື່ອ",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "ຂຽນຄຳແນະນຳຢູ່ນີ້,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} ບໍ່ມີຢູ່",
"agentDetail.configure.prompt.richTip": "ກຳນົດບົດບາດຂອງຕົວແທນ ແລະ ວິທີທີ່ຄວນເຮັດວຽກ. <docLink>ຮຽນຮູ້ເພີ່ມເຕີມ</docLink>",
- "agentDetail.configure.prompt.tip": "ກຳນົດບົດບາດຂອງຕົວແທນ ແລະ ວິທີທີ່ຄວນເຮັດວຽກ. ຮຽນຮູ້ເພີ່ມເຕີມ",
"agentDetail.configure.publishBar.draft": "ສະບັບຮ່າງ",
"agentDetail.configure.publishBar.publishUpdate": "ເຜີຍແຜ່ການອັບເດດ",
"agentDetail.configure.publishBar.published": "ເຜີຍແຜ່ແລ້ວ",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "ລຶບ {{name}} ອອກ",
"agentDetail.configure.tools.removeProvider": "ລຶບເຄື່ອງມືທັງໝົດ",
"agentDetail.configure.tools.richTip": "ເພີ່ມເຄື່ອງມື Dify ຈາກພື້ນທີ່ເຮັດວຽກຂອງທ່ານ. <docLink>ຮຽນຮູ້ເພີ່ມເຕີມ</docLink>\n\nເຄື່ອງມືທີ່ຕົວແທນຕິດຕັ້ງໃນແຊນບ໋ອກຊ໌ຈະບໍ່ປາກົດຢູ່ນີ້ ແຕ່ຍັງສາມາດໃຊ້ງານໄດ້.",
- "agentDetail.configure.tools.tip": "ເພີ່ມເຄື່ອງມື Dify ຈາກພື້ນທີ່ເຮັດວຽກຂອງທ່ານ. ຮຽນຮູ້ເພີ່ມເຕີມ\n\nເຄື່ອງມືທີ່ຕົວແທນຕິດຕັ້ງໃນແຊນບ໋ອກຊ໌ຈະບໍ່ປາກົດຢູ່ນີ້ ແຕ່ຍັງສາມາດໃຊ້ງານໄດ້.",
"agentDetail.configure.tools.toolTabs.all": "ທັງໝົດ",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "ກຳນົດເອງ",
diff --git a/web/i18n/locales/nl-NL/agent-v-2.json b/web/i18n/locales/nl-NL/agent-v-2.json
index 121e6985a1b..99444251030 100644
--- a/web/i18n/locales/nl-NL/agent-v-2.json
+++ b/web/i18n/locales/nl-NL/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Bestand toevoegen",
"agentDetail.configure.files.buildNote.generated": "Gegenereerd",
"agentDetail.configure.files.buildNote.richTooltip": "Het verslag van de agent van wat hij in de Build-modus heeft ingesteld. Hij leest dit aan het begin van elk gesprek, samen met uw Prompt. <docLink>Meer informatie</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Het verslag van de agent van wat hij in de Build-modus heeft ingesteld. Hij leest dit aan het begin van elk gesprek, samen met uw Prompt. Meer informatie",
"agentDetail.configure.files.download": "{{name}} downloaden",
"agentDetail.configure.files.empty.description": "Upload documenten die de agent kan lezen, zoals specificaties, sjablonen of richtlijnen",
"agentDetail.configure.files.empty.title": "Nog geen bestanden",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Schrijf hier instructies,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} bestaat niet",
"agentDetail.configure.prompt.richTip": "Bepaal de rol van de agent en hoe die moet werken. <docLink>Meer informatie</docLink>",
- "agentDetail.configure.prompt.tip": "Bepaal de rol van de agent en hoe die moet werken. Meer informatie",
"agentDetail.configure.publishBar.draft": "Concept",
"agentDetail.configure.publishBar.publishUpdate": "Update publiceren",
"agentDetail.configure.publishBar.published": "Gepubliceerd",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} verwijderen",
"agentDetail.configure.tools.removeProvider": "Alle tools verwijderen",
"agentDetail.configure.tools.richTip": "Voeg Dify-tools uit uw workspace toe. <docLink>Meer informatie</docLink>\n\nTools die de agent in zijn sandbox installeert, verschijnen hier niet, maar blijven beschikbaar.",
- "agentDetail.configure.tools.tip": "Voeg Dify-tools uit uw workspace toe. Meer informatie\n\nTools die de agent in zijn sandbox installeert, verschijnen hier niet, maar blijven beschikbaar.",
"agentDetail.configure.tools.toolTabs.all": "Alle",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Aangepast",
diff --git a/web/i18n/locales/pl-PL/agent-v-2.json b/web/i18n/locales/pl-PL/agent-v-2.json
index 91b504d67e3..199c7e3d6d7 100644
--- a/web/i18n/locales/pl-PL/agent-v-2.json
+++ b/web/i18n/locales/pl-PL/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Dodaj plik",
"agentDetail.configure.files.buildNote.generated": "Wygenerowano",
"agentDetail.configure.files.buildNote.richTooltip": "Zapis agenta tego, co skonfigurował w trybie Build. Odczytuje go na początku każdej rozmowy razem z Twoim Promptem. <docLink>Dowiedz się więcej</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Zapis agenta tego, co skonfigurował w trybie Build. Odczytuje go na początku każdej rozmowy razem z Twoim Promptem. Dowiedz się więcej",
"agentDetail.configure.files.download": "Pobierz {{name}}",
"agentDetail.configure.files.empty.description": "Prześlij dokumenty, które agent może czytać, np. specyfikacje, szablony lub wytyczne",
"agentDetail.configure.files.empty.title": "Brak plików",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Napisz tutaj instrukcje,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} nie istnieje",
"agentDetail.configure.prompt.richTip": "Określ rolę agenta i sposób jego działania. <docLink>Dowiedz się więcej</docLink>",
- "agentDetail.configure.prompt.tip": "Określ rolę agenta i sposób jego działania. Dowiedz się więcej",
"agentDetail.configure.publishBar.draft": "Wersja robocza",
"agentDetail.configure.publishBar.publishUpdate": "Opublikuj aktualizację",
"agentDetail.configure.publishBar.published": "Opublikowane",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Usuń {{name}}",
"agentDetail.configure.tools.removeProvider": "Usuń wszystkie narzędzia",
"agentDetail.configure.tools.richTip": "Dodaj narzędzia Dify ze swojego workspace. <docLink>Dowiedz się więcej</docLink>\n\nNarzędzia instalowane przez agenta w jego sandbox nie pojawią się tutaj, ale pozostaną dla niego dostępne.",
- "agentDetail.configure.tools.tip": "Dodaj narzędzia Dify ze swojego workspace. Dowiedz się więcej\n\nNarzędzia instalowane przez agenta w jego sandbox nie pojawią się tutaj, ale pozostaną dla niego dostępne.",
"agentDetail.configure.tools.toolTabs.all": "Wszystkie",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Niestandardowe",
diff --git a/web/i18n/locales/pt-BR/agent-v-2.json b/web/i18n/locales/pt-BR/agent-v-2.json
index 38bfae9402e..67f3230610a 100644
--- a/web/i18n/locales/pt-BR/agent-v-2.json
+++ b/web/i18n/locales/pt-BR/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Adicionar arquivo",
"agentDetail.configure.files.buildNote.generated": "Gerado",
"agentDetail.configure.files.buildNote.richTooltip": "O registro do agente do que ele configurou no modo Build. Ele lê isso no início de cada conversa, junto com seu Prompt. <docLink>Saiba mais</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "O registro do agente do que ele configurou no modo Build. Ele lê isso no início de cada conversa, junto com seu Prompt. Saiba mais",
"agentDetail.configure.files.download": "Baixar {{name}}",
"agentDetail.configure.files.empty.description": "Envie documentos que o agente possa ler, como especificações, modelos ou diretrizes",
"agentDetail.configure.files.empty.title": "Ainda não há arquivos",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Escreva as instruções aqui,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} não existe",
"agentDetail.configure.prompt.richTip": "Defina o papel do agente e como ele deve trabalhar. <docLink>Saiba mais</docLink>",
- "agentDetail.configure.prompt.tip": "Defina o papel do agente e como ele deve trabalhar. Saiba mais",
"agentDetail.configure.publishBar.draft": "Rascunho",
"agentDetail.configure.publishBar.publishUpdate": "Publicar atualização",
"agentDetail.configure.publishBar.published": "Publicado",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Remover {{name}}",
"agentDetail.configure.tools.removeProvider": "Remover todas as ferramentas",
"agentDetail.configure.tools.richTip": "Adicione ferramentas Dify do seu workspace. <docLink>Saiba mais</docLink>\n\nAs ferramentas que o agente instala no sandbox não aparecerão aqui, mas continuarão disponíveis para ele.",
- "agentDetail.configure.tools.tip": "Adicione ferramentas Dify do seu workspace. Saiba mais\n\nAs ferramentas que o agente instala no sandbox não aparecerão aqui, mas continuarão disponíveis para ele.",
"agentDetail.configure.tools.toolTabs.all": "Todas",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Personalizado",
diff --git a/web/i18n/locales/ro-RO/agent-v-2.json b/web/i18n/locales/ro-RO/agent-v-2.json
index b0aec2a25bf..3eb935ef2e0 100644
--- a/web/i18n/locales/ro-RO/agent-v-2.json
+++ b/web/i18n/locales/ro-RO/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Adaugă fișier",
"agentDetail.configure.files.buildNote.generated": "Generat",
"agentDetail.configure.files.buildNote.richTooltip": "Înregistrarea agentului despre ce a configurat în modul Build. O citește la începutul fiecărei conversații, împreună cu Promptul dvs. <docLink>Aflați mai multe</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Înregistrarea agentului despre ce a configurat în modul Build. O citește la începutul fiecărei conversații, împreună cu Promptul dvs. Aflați mai multe",
"agentDetail.configure.files.download": "Descarcă {{name}}",
"agentDetail.configure.files.empty.description": "Încarcă documente pe care agentul le poate citi, precum specificații, șabloane sau ghiduri",
"agentDetail.configure.files.empty.title": "Niciun fișier încă",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Scrieți instrucțiunile aici,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} nu există",
"agentDetail.configure.prompt.richTip": "Definiți rolul agentului și modul în care ar trebui să lucreze. <docLink>Aflați mai multe</docLink>",
- "agentDetail.configure.prompt.tip": "Definiți rolul agentului și modul în care ar trebui să lucreze. Aflați mai multe",
"agentDetail.configure.publishBar.draft": "Ciornă",
"agentDetail.configure.publishBar.publishUpdate": "Publică actualizarea",
"agentDetail.configure.publishBar.published": "Publicat",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Eliminați {{name}}",
"agentDetail.configure.tools.removeProvider": "Eliminați toate instrumentele",
"agentDetail.configure.tools.richTip": "Adăugați instrumente Dify din workspace. <docLink>Aflați mai multe</docLink>\n\nInstrumentele pe care agentul le instalează în sandbox nu vor apărea aici, dar îi vor rămâne disponibile.",
- "agentDetail.configure.tools.tip": "Adăugați instrumente Dify din workspace. Aflați mai multe\n\nInstrumentele pe care agentul le instalează în sandbox nu vor apărea aici, dar îi vor rămâne disponibile.",
"agentDetail.configure.tools.toolTabs.all": "Toate",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Personalizat",
diff --git a/web/i18n/locales/ru-RU/agent-v-2.json b/web/i18n/locales/ru-RU/agent-v-2.json
index b56408a8c69..f1e3cd7a186 100644
--- a/web/i18n/locales/ru-RU/agent-v-2.json
+++ b/web/i18n/locales/ru-RU/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Добавить файл",
"agentDetail.configure.files.buildNote.generated": "Сгенерировано",
"agentDetail.configure.files.buildNote.richTooltip": "Запись агента о том, что он настроил в режиме Build. Он читает ее в начале каждого разговора вместе с вашим Prompt. <docLink>Подробнее</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Запись агента о том, что он настроил в режиме Build. Он читает ее в начале каждого разговора вместе с вашим Prompt. Подробнее",
"agentDetail.configure.files.download": "Скачать {{name}}",
"agentDetail.configure.files.empty.description": "Загрузите документы, которые может прочитать агент, например спецификации, шаблоны или руководства",
"agentDetail.configure.files.empty.title": "Пока нет файлов",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Напишите инструкции здесь,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} не существует",
"agentDetail.configure.prompt.richTip": "Определите роль агента и то, как он должен работать. <docLink>Подробнее</docLink>",
- "agentDetail.configure.prompt.tip": "Определите роль агента и то, как он должен работать. Подробнее",
"agentDetail.configure.publishBar.draft": "Черновик",
"agentDetail.configure.publishBar.publishUpdate": "Опубликовать обновление",
"agentDetail.configure.publishBar.published": "Опубликовано",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Удалить {{name}}",
"agentDetail.configure.tools.removeProvider": "Удалить все инструменты",
"agentDetail.configure.tools.richTip": "Добавьте инструменты Dify из своего workspace. <docLink>Подробнее</docLink>\n\nИнструменты, которые агент устанавливает в своей sandbox, не появятся здесь, но останутся ему доступны.",
- "agentDetail.configure.tools.tip": "Добавьте инструменты Dify из своего workspace. Подробнее\n\nИнструменты, которые агент устанавливает в своей sandbox, не появятся здесь, но останутся ему доступны.",
"agentDetail.configure.tools.toolTabs.all": "Все",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Пользовательские",
diff --git a/web/i18n/locales/sl-SI/agent-v-2.json b/web/i18n/locales/sl-SI/agent-v-2.json
index 298b3bf67cc..c5fe05da73d 100644
--- a/web/i18n/locales/sl-SI/agent-v-2.json
+++ b/web/i18n/locales/sl-SI/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Dodaj datoteko",
"agentDetail.configure.files.buildNote.generated": "Ustvarjeno",
"agentDetail.configure.files.buildNote.richTooltip": "Agentov zapis tega, kar je nastavil v načinu Build. Prebere ga na začetku vsakega pogovora skupaj z vašim Promptom. <docLink>Več informacij</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Agentov zapis tega, kar je nastavil v načinu Build. Prebere ga na začetku vsakega pogovora skupaj z vašim Promptom. Več informacij",
"agentDetail.configure.files.download": "Prenesi {{name}}",
"agentDetail.configure.files.empty.description": "Naložite dokumente, ki jih lahko agent bere, npr. specifikacije, predloge ali smernice",
"agentDetail.configure.files.empty.title": "Še ni datotek",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Tukaj napišite navodila,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} ne obstaja",
"agentDetail.configure.prompt.richTip": "Določite vlogo agenta in način njegovega delovanja. <docLink>Več o tem</docLink>",
- "agentDetail.configure.prompt.tip": "Določite vlogo agenta in način njegovega delovanja. Več o tem",
"agentDetail.configure.publishBar.draft": "Osnutek",
"agentDetail.configure.publishBar.publishUpdate": "Objavi posodobitev",
"agentDetail.configure.publishBar.published": "Objavljeno",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Odstrani {{name}}",
"agentDetail.configure.tools.removeProvider": "Odstrani vsa orodja",
"agentDetail.configure.tools.richTip": "Dodajte orodja Dify iz svojega workspacea. <docLink>Več informacij</docLink>\n\nOrodja, ki jih agent namesti v svoj sandbox, se tukaj ne bodo prikazala, vendar mu ostanejo na voljo.",
- "agentDetail.configure.tools.tip": "Dodajte orodja Dify iz svojega workspacea. Več informacij\n\nOrodja, ki jih agent namesti v svoj sandbox, se tukaj ne bodo prikazala, vendar mu ostanejo na voljo.",
"agentDetail.configure.tools.toolTabs.all": "Vse",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Po meri",
diff --git a/web/i18n/locales/th-TH/agent-v-2.json b/web/i18n/locales/th-TH/agent-v-2.json
index 3cf5060f3a9..30cd9f7ea2b 100644
--- a/web/i18n/locales/th-TH/agent-v-2.json
+++ b/web/i18n/locales/th-TH/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "เพิ่มไฟล์",
"agentDetail.configure.files.buildNote.generated": "สร้างแล้ว",
"agentDetail.configure.files.buildNote.richTooltip": "บันทึกของ agent เกี่ยวกับสิ่งที่ตั้งค่าไว้ในโหมด Build โดยจะอ่านสิ่งนี้ตอนเริ่มทุกบทสนทนา พร้อมกับ Prompt ของคุณ <docLink>เรียนรู้เพิ่มเติม</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "บันทึกของ agent เกี่ยวกับสิ่งที่ตั้งค่าไว้ในโหมด Build โดยจะอ่านสิ่งนี้ตอนเริ่มทุกบทสนทนา พร้อมกับ Prompt ของคุณ เรียนรู้เพิ่มเติม",
"agentDetail.configure.files.download": "ดาวน์โหลด {{name}}",
"agentDetail.configure.files.empty.description": "อัปโหลดเอกสารที่ตัวแทนสามารถอ่านได้ เช่น ข้อกำหนด เทมเพลต หรือแนวทาง",
"agentDetail.configure.files.empty.title": "ยังไม่มีไฟล์",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "เขียนคำสั่งที่นี่,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} ไม่มีอยู่",
"agentDetail.configure.prompt.richTip": "กำหนดบทบาทของเอเจนต์และวิธีการทำงาน <docLink>ดูข้อมูลเพิ่มเติม</docLink>",
- "agentDetail.configure.prompt.tip": "กำหนดบทบาทของเอเจนต์และวิธีการทำงาน ดูข้อมูลเพิ่มเติม",
"agentDetail.configure.publishBar.draft": "ฉบับร่าง",
"agentDetail.configure.publishBar.publishUpdate": "เผยแพร่อัปเดต",
"agentDetail.configure.publishBar.published": "เผยแพร่แล้ว",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "ลบ {{name}}",
"agentDetail.configure.tools.removeProvider": "ลบเครื่องมือทั้งหมด",
"agentDetail.configure.tools.richTip": "เพิ่มเครื่องมือ Dify จาก workspace ของคุณ <docLink>เรียนรู้เพิ่มเติม</docLink>\n\nเครื่องมือที่ agent ติดตั้งใน sandbox จะไม่แสดงที่นี่ แต่ยังคงพร้อมใช้งานสำหรับ agent",
- "agentDetail.configure.tools.tip": "เพิ่มเครื่องมือ Dify จาก workspace ของคุณ เรียนรู้เพิ่มเติม\n\nเครื่องมือที่ agent ติดตั้งใน sandbox จะไม่แสดงที่นี่ แต่ยังคงพร้อมใช้งานสำหรับ agent",
"agentDetail.configure.tools.toolTabs.all": "ทั้งหมด",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "กำหนดเอง",
diff --git a/web/i18n/locales/tr-TR/agent-v-2.json b/web/i18n/locales/tr-TR/agent-v-2.json
index 59fbfb0b598..efe8d34d004 100644
--- a/web/i18n/locales/tr-TR/agent-v-2.json
+++ b/web/i18n/locales/tr-TR/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Dosya ekle",
"agentDetail.configure.files.buildNote.generated": "Oluşturuldu",
"agentDetail.configure.files.buildNote.richTooltip": "Agent'ın Build mode'da kurduğu şeylerin kaydı. Her konuşmanın başında bunu Prompt'unuzla birlikte okur. <docLink>Daha fazla bilgi</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Agent'ın Build mode'da kurduğu şeylerin kaydı. Her konuşmanın başında bunu Prompt'unuzla birlikte okur. Daha fazla bilgi",
"agentDetail.configure.files.download": "{{name}} indir",
"agentDetail.configure.files.empty.description": "Ajanın okuyabileceği belgeleri yükleyin, örneğin spesifikasyonlar, şablonlar veya yönergeler",
"agentDetail.configure.files.empty.title": "Henüz dosya yok",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Talimatları buraya yazın,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} mevcut değil",
"agentDetail.configure.prompt.richTip": "Agent'ın rolünü ve nasıl çalışması gerektiğini tanımlayın. <docLink>Daha fazla bilgi</docLink>",
- "agentDetail.configure.prompt.tip": "Agent'ın rolünü ve nasıl çalışması gerektiğini tanımlayın. Daha fazla bilgi",
"agentDetail.configure.publishBar.draft": "Taslak",
"agentDetail.configure.publishBar.publishUpdate": "Güncellemeyi yayınla",
"agentDetail.configure.publishBar.published": "Yayınlandı",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "{{name}} kaldır",
"agentDetail.configure.tools.removeProvider": "Tüm araçları kaldır",
"agentDetail.configure.tools.richTip": "Workspace'inizden Dify araçları ekleyin. <docLink>Daha fazla bilgi</docLink>\n\nAgent'ın sandbox içinde yüklediği araçlar burada görünmez, ancak kullanıma açık kalır.",
- "agentDetail.configure.tools.tip": "Workspace'inizden Dify araçları ekleyin. Daha fazla bilgi\n\nAgent'ın sandbox içinde yüklediği araçlar burada görünmez, ancak kullanıma açık kalır.",
"agentDetail.configure.tools.toolTabs.all": "Tümü",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Özel",
diff --git a/web/i18n/locales/uk-UA/agent-v-2.json b/web/i18n/locales/uk-UA/agent-v-2.json
index 796020eba30..f58989bb24c 100644
--- a/web/i18n/locales/uk-UA/agent-v-2.json
+++ b/web/i18n/locales/uk-UA/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Додати файл",
"agentDetail.configure.files.buildNote.generated": "Згенеровано",
"agentDetail.configure.files.buildNote.richTooltip": "Запис агента про те, що він налаштував у режимі Build. Він читає його на початку кожної розмови разом із вашим Prompt. <docLink>Докладніше</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Запис агента про те, що він налаштував у режимі Build. Він читає його на початку кожної розмови разом із вашим Prompt. Докладніше",
"agentDetail.configure.files.download": "Завантажити {{name}}",
"agentDetail.configure.files.empty.description": "Завантажте документи, які може читати агент, наприклад специфікації, шаблони чи інструкції",
"agentDetail.configure.files.empty.title": "Файлів ще немає",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Напишіть інструкції тут,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} не існує",
"agentDetail.configure.prompt.richTip": "Визначте роль агента та спосіб його роботи. <docLink>Докладніше</docLink>",
- "agentDetail.configure.prompt.tip": "Визначте роль агента та спосіб його роботи. Докладніше",
"agentDetail.configure.publishBar.draft": "Чернетка",
"agentDetail.configure.publishBar.publishUpdate": "Опублікувати оновлення",
"agentDetail.configure.publishBar.published": "Опубліковано",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Видалити {{name}}",
"agentDetail.configure.tools.removeProvider": "Видалити всі інструменти",
"agentDetail.configure.tools.richTip": "Додайте інструменти Dify зі свого workspace. <docLink>Докладніше</docLink>\n\nІнструменти, які агент встановлює у своїй sandbox, не з'являться тут, але залишаться йому доступними.",
- "agentDetail.configure.tools.tip": "Додайте інструменти Dify зі свого workspace. Докладніше\n\nІнструменти, які агент встановлює у своїй sandbox, не з'являться тут, але залишаться йому доступними.",
"agentDetail.configure.tools.toolTabs.all": "Усі",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Користувацькі",
diff --git a/web/i18n/locales/vi-VN/agent-v-2.json b/web/i18n/locales/vi-VN/agent-v-2.json
index cf246488919..0a5f4cc28e6 100644
--- a/web/i18n/locales/vi-VN/agent-v-2.json
+++ b/web/i18n/locales/vi-VN/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "Thêm tệp",
"agentDetail.configure.files.buildNote.generated": "Đã tạo",
"agentDetail.configure.files.buildNote.richTooltip": "Bản ghi của tác nhân về những gì nó đã thiết lập trong chế độ Build. Nó đọc bản ghi này ở đầu mỗi cuộc trò chuyện, cùng với Prompt của bạn. <docLink>Tìm hiểu thêm</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Bản ghi của tác nhân về những gì nó đã thiết lập trong chế độ Build. Nó đọc bản ghi này ở đầu mỗi cuộc trò chuyện, cùng với Prompt của bạn. Tìm hiểu thêm",
"agentDetail.configure.files.download": "Tải xuống {{name}}",
"agentDetail.configure.files.empty.description": "Tải lên tài liệu mà tác nhân có thể đọc, như đặc tả, mẫu hoặc hướng dẫn",
"agentDetail.configure.files.empty.title": "Chưa có tệp nào",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "Viết hướng dẫn tại đây,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} không tồn tại",
"agentDetail.configure.prompt.richTip": "Xác định vai trò của tác nhân và cách tác nhân hoạt động. <docLink>Tìm hiểu thêm</docLink>",
- "agentDetail.configure.prompt.tip": "Xác định vai trò của tác nhân và cách tác nhân hoạt động. Tìm hiểu thêm",
"agentDetail.configure.publishBar.draft": "Bản nháp",
"agentDetail.configure.publishBar.publishUpdate": "Xuất bản cập nhật",
"agentDetail.configure.publishBar.published": "Đã xuất bản",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "Xóa {{name}}",
"agentDetail.configure.tools.removeProvider": "Xóa tất cả công cụ",
"agentDetail.configure.tools.richTip": "Thêm công cụ Dify từ workspace của bạn. <docLink>Tìm hiểu thêm</docLink>\n\nNhững công cụ tác nhân cài đặt trong sandbox sẽ không xuất hiện ở đây nhưng vẫn khả dụng cho tác nhân.",
- "agentDetail.configure.tools.tip": "Thêm công cụ Dify từ workspace của bạn. Tìm hiểu thêm\n\nNhững công cụ tác nhân cài đặt trong sandbox sẽ không xuất hiện ở đây nhưng vẫn khả dụng cho tác nhân.",
"agentDetail.configure.tools.toolTabs.all": "Tất cả",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "Tùy chỉnh",
diff --git a/web/i18n/locales/zh-Hans/agent-v-2.json b/web/i18n/locales/zh-Hans/agent-v-2.json
index 62a983eb876..65442aa7788 100644
--- a/web/i18n/locales/zh-Hans/agent-v-2.json
+++ b/web/i18n/locales/zh-Hans/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "添加文件",
"agentDetail.configure.files.buildNote.generated": "已生成",
"agentDetail.configure.files.buildNote.richTooltip": "Agent 在构建模式中完成的设置都记录在这里。每次对话开始时,它会连同提示词一起读取这份记录。<docLink>了解更多</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Agent 在构建模式中完成的设置都记录在这里。每次对话开始时,它会连同提示词一起读取这份记录。了解更多",
"agentDetail.configure.files.download": "下载 {{name}}",
"agentDetail.configure.files.empty.description": "上传 Agent 可读取的文档,例如规格、模板或指南",
"agentDetail.configure.files.empty.title": "暂无文件",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "在此编写指令,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} 不存在",
"agentDetail.configure.prompt.richTip": "设定 Agent 的角色和工作方式。<docLink>了解更多</docLink>",
- "agentDetail.configure.prompt.tip": "设定 Agent 的角色和工作方式。了解更多",
"agentDetail.configure.publishBar.draft": "草稿",
"agentDetail.configure.publishBar.publishUpdate": "发布更新",
"agentDetail.configure.publishBar.published": "已发布",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "移除 {{name}}",
"agentDetail.configure.tools.removeProvider": "移除所有工具",
"agentDetail.configure.tools.richTip": "添加工作空间中的 Dify 工具。<docLink>了解更多</docLink>\n\nAgent 在沙箱中自行安装的工具不会显示在这里,但仍然可用。",
- "agentDetail.configure.tools.tip": "添加工作空间中的 Dify 工具。了解更多\n\nAgent 在沙箱中自行安装的工具不会显示在这里,但仍然可用。",
"agentDetail.configure.tools.toolTabs.all": "全部",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "自定义",
diff --git a/web/i18n/locales/zh-Hant/agent-v-2.json b/web/i18n/locales/zh-Hant/agent-v-2.json
index 0917c598e50..7069e5e751f 100644
--- a/web/i18n/locales/zh-Hant/agent-v-2.json
+++ b/web/i18n/locales/zh-Hant/agent-v-2.json
@@ -93,7 +93,6 @@
"agentDetail.configure.files.add": "新增檔案",
"agentDetail.configure.files.buildNote.generated": "已生成",
"agentDetail.configure.files.buildNote.richTooltip": "Agent 在建置模式中完成的設定都記錄在這裡。每次對話開始時,它會連同提示詞一起讀取這份記錄。<docLink>了解更多</docLink>",
- "agentDetail.configure.files.buildNote.tooltip": "Agent 在建置模式中完成的設定都記錄在這裡。每次對話開始時,它會連同提示詞一起讀取這份記錄。了解更多",
"agentDetail.configure.files.download": "下載 {{name}}",
"agentDetail.configure.files.empty.description": "上傳 Agent 可讀取的文件,例如規格、範本或指南",
"agentDetail.configure.files.empty.title": "暫無檔案",
@@ -167,7 +166,6 @@
"agentDetail.configure.prompt.placeholder": "在此編寫指令,",
"agentDetail.configure.prompt.referenceMissing": "{{name}} 不存在",
"agentDetail.configure.prompt.richTip": "設定 Agent 的角色和工作方式。<docLink>了解更多</docLink>",
- "agentDetail.configure.prompt.tip": "設定 Agent 的角色和工作方式。了解更多",
"agentDetail.configure.publishBar.draft": "草稿",
"agentDetail.configure.publishBar.publishUpdate": "發佈更新",
"agentDetail.configure.publishBar.published": "已發佈",
@@ -268,7 +266,6 @@
"agentDetail.configure.tools.removeAction": "移除 {{name}}",
"agentDetail.configure.tools.removeProvider": "移除所有工具",
"agentDetail.configure.tools.richTip": "新增工作區中的 Dify 工具。<docLink>了解更多</docLink>\n\nAgent 在沙箱中自行安裝的工具不會顯示在這裡,但仍然可用。",
- "agentDetail.configure.tools.tip": "新增工作區中的 Dify 工具。了解更多\n\nAgent 在沙箱中自行安裝的工具不會顯示在這裡,但仍然可用。",
"agentDetail.configure.tools.toolTabs.all": "全部",
"agentDetail.configure.tools.toolTabs.cli": "CLI",
"agentDetail.configure.tools.toolTabs.custom": "自訂",