langgenius / langgenius/dify

Workflow condition variable selectors cannot be opened from the keyboard

Open
#42,132 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

## Problem

PR #42121 fixed popup initial-focus ownership and explicitly left three existing `div` trigger semantics defects for a separate follow-up.

Those three TODOs are still present on `main` in:

- If/Else condition variable selector
- Loop condition variable selector
- Knowledge Retrieval metadata condition variable selector

Each selector renders a `PopoverTrigger` with a `

` trigger but does not declare non-native button semantics. Mouse interaction still works, but the trigger does not get the expected keyboard-accessible button behavior.

## Expected behavior

These variable selectors should be operable from the keyboard:

- the trigger can be reached with Tab;
- Enter / Space opens the popover;
- after opening, the search input keeps the initial-focus behavior established by #42121.

## Proposed scope

Keep this as a narrow follow-up to #42121:

1. declare the existing `

` triggers as non-native buttons using the same `PopoverTrigger nativeButton={false}` pattern already used by nearby workflow controls;
2. add focused keyboard regression tests for the affected selectors;
3. keep mouse behavior, visuals, touch policy, controlled state, and popup focus behavior unchanged.

I’d like to implement this follow-up if the scope is welcome. Could you assign this issue to me, or confirm that a PR following this scope would be appropriate?

Contributor guide

Open the contributing guide

Research direction

Start with the If/Else, Loop, and Knowledge Retrieval metadata condition variable selector implementations on main, comparing their PopoverTrigger usage with nearby workflow controls and PR #42121. Add focused keyboard regression coverage and verify that Tab reaches each trigger, Enter/Space opens the popover, and the search input retains the established initial focus while mouse behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
accessibility, frontend, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.