swagger-ui
swagger-ui copied to clipboard
a11y: Once you expand a data element of a schema, there is no way to collapse it again.
Q&A (please complete the following information)
- OS: [e.g. macOS] Windows 10
- Browser: [e.g. chrome, safari] Chrome
- Version: [e.g. 22] 121
- Method of installation: [e.g. npm, dist assets] npm
- Swagger-UI version: [e.g. 3.10.0] Swagger UI React 5.11.3
- Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] OpenAPI 3.0
Content & configuration
Basic/ default
Describe the bug you're encountering
Once you expand a data element of a schema, there is no way to collapse it again. It looks like collapsed data elements have a "td" with buttons containing class "model-box-control and span with classes "model-toggle collapsed" which are NOT included for the elements that are already expanded.
To reproduce...
Expand Schema, expand an input or output schema, expand a data element. Once expanded, there is no way to contract it again.
Expected behavior
Once expanded, it should be collapsible
Screenshots
Note for the expanded elements, there is no caret to collapse it again.
Additional context or thoughts
I am really interested in working on this issue. Can you assign it to continue with this issue.
@cjfreedman I would be thankful if you could assign this issue to me.
@rajat-gith I don't have authority to assign it to you. I suggest you just fix it and then submit a pull request.
Addressed in https://github.com/swagger-api/swagger-ui/pull/9639