website icon indicating copy to clipboard operation
website copied to clipboard

🐛 Bug: FAQ Accordion Tabs Do Not Close on Repeated Clicks

Open Karan-Palan opened this issue 11 months ago • 12 comments

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

  1. Go to the FAQ section on the JSON Schema website.
  2. Click on the "+" icon of any question to expand its content, then click on 'x' icon, it will close
  3. Click on the same tab header again.
  4. 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 avatar Jan 11 '25 09:01 Karan-Palan

@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 avatar Jan 11 '25 12:01 Utkarsh-123github

@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.

Karan-Palan avatar Jan 11 '25 12:01 Karan-Palan

Hii @DhairyaMajmudar, I would love to work on this issue, if no one is working?

shantanu2107 avatar Jan 21 '25 17:01 shantanu2107

@shantanu2107 I'm working on other issues rn, feel free to pick this up once assigned

Karan-Palan avatar Jan 21 '25 17:01 Karan-Palan

@shantanu2107 , if you're not working on this one, I can work on it now

Karan-Palan avatar Feb 01 '25 17:02 Karan-Palan

I will raise a PR tomorrow. @Karan-Palan

shantanu2107 avatar Feb 01 '25 17:02 shantanu2107

@shantanu2107 , ping me if you need any help with it

Karan-Palan avatar Feb 03 '25 11:02 Karan-Palan

Hi @Karan-Palan , if no one is working on this issue, can I take this up?

Apurv428 avatar Feb 25 '25 19:02 Apurv428

Someone is already assigned. However he hasn't worked on it. You may take it up however Wait for an assignment before raising PR

Karan-Palan avatar Feb 25 '25 19:02 Karan-Palan

@benjagm I noticed the issue is not active by the one assigned to it. Can you assign it to me?

idanidan29 avatar Mar 03 '25 14:03 idanidan29

@shantanu2107 any progress on this ? Do you need any help ?

DhairyaMajmudar avatar Mar 11 '25 09:03 DhairyaMajmudar

Hi @benjagm, I noticed that the assigned contributor hasn't been active for a while. May I take over this task?

idanidan29 avatar Mar 11 '25 14:03 idanidan29

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!!

benjagm avatar May 31 '25 09:05 benjagm