Dropdown Element Not Detected as Interactive
Bug Description
The isInteractiveElement function in buildDomTree.js fails to recognize a dropdown element as interactive. The function checks interactivity based on attributes such as role, tabindex, and event listeners, but in this case, the interactive part of the dropdown is a child element, while the outer container (which visually represents the dropdown) lacks these attributes. As a result, the dropdown is not flagged as interactive unless a debug override is set.
Reproduction Steps
- Use the buildDomTree function to process the DOM, which includes a dropdown component. (Refer to Code Sample section)
- Observe that the dropdown's container element is not flagged as interactive.
- Modify line 369 to force isInteractive = true.
- Run the function again and see that the dropdown, along with its child components, is now detected.
Code Sample
<div class="col-sm-8"><span>
<div class="Select Select--multi">
<div class="Select-control"><span class="Select-multi-value-wrapper"
id="react-select-2--value">
<div class="Select-placeholder">選択してください。</div>
<div role="combobox" aria-expanded="false" aria-owns=""
aria-activedescendant="react-select-2--value"
class="Select-input" tabindex="0" aria-disabled="false"
style="border: 0px; width: 1px; display: inline-block;"></div>
</span><span class="Select-arrow-zone"><span
class="Select-arrow"></span></span></div>
</div>
<div class="text-danger"></div>
</span>
</div>
Version
0.1.36
LLM Model
GPT-4o
Operating System
macOS Sonoma
Relevant Log Output
+1 the same problem
+1 the same problem
I have solved the above issue and created a pr, could anyone of you @wtberry @micheal888666 @bolt163 check this and tell if it works now?
I have solved the above issue and created a pr, could anyone of you @wtberry @micheal888666 @bolt163 check this and tell if it works now?
Ok, I'll verify and let you know later.
Have you verified it? @micheal888666
@anish891 No, the pr is breaking the entire js file with syntax error now.
@AlinJiang I have solved the issue now.