🐛 Bug: FAQ Accordion Tabs Do Not Close on Repeated Clicks
Describe the bug
In the FAQ section, when a question is expanded by clicking on its tab header, clicking on the same header again does not toggle it closed. This behavior forces the user to click the "x" icon to close the tab, creating an inconsistent experience.
Steps To Reproduce
- Go to the FAQ section on the JSON Schema website.
- Click on the "+" icon of any question to expand its content, then click on 'x' icon, it will close
- Click on the same tab header again.
- Observe that the tab remains open instead of toggling closed.
Expected Behavior
Clicking on the tab header of an expanded FAQ question should close the accordion, allowing users to toggle it on and off by clicking the same header.
Screenshots
https://github.com/user-attachments/assets/4473eb91-eb7c-4fc1-b41d-e26887f0e5bc
Device Information [optional]
- OS: Windows 11 (as recording shows mouse cursor)
- Browser: Browser
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
@Karan-Palan I think this isn't an issue to be noticed because buttons are provided with some reason and functionality to do the required action.
@Utkarsh-123github Thank you for sharing your perspective. While I agree that buttons are provided for specific functionality, the issue here is regarding the user experience and consistency. Accordions are generally expected to toggle open and closed when clicking on the same header, which is a standard behavior across many interfaces.
Since the accordion opens on clicking on it, it should close the expanded section too by clicking. This is my POV, will wait for the maintainers and other community members views on it before proceeding with Pull requests on any issues.
Hii @DhairyaMajmudar, I would love to work on this issue, if no one is working?
@shantanu2107 I'm working on other issues rn, feel free to pick this up once assigned
@shantanu2107 , if you're not working on this one, I can work on it now
I will raise a PR tomorrow. @Karan-Palan
@shantanu2107 , ping me if you need any help with it
Hi @Karan-Palan , if no one is working on this issue, can I take this up?
Someone is already assigned. However he hasn't worked on it. You may take it up however Wait for an assignment before raising PR
@benjagm I noticed the issue is not active by the one assigned to it. Can you assign it to me?
@shantanu2107 any progress on this ? Do you need any help ?
Hi @benjagm, I noticed that the assigned contributor hasn't been active for a while. May I take over this task?
Hi everyone. This issue will be fixed as part of the GSoC project #1654 . For this reason, we will close it and work on the new version of the component.
Thanks everyone!!