swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

a11y: Once you expand a data element of a schema, there is no way to collapse it again.

Open cjfreedman opened this issue 1 year ago • 2 comments

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

Additional context or thoughts

cjfreedman avatar Feb 14 '24 16:02 cjfreedman

I am really interested in working on this issue. Can you assign it to continue with this issue.

rajat-gith avatar Feb 17 '24 08:02 rajat-gith

@cjfreedman I would be thankful if you could assign this issue to me.

rajat-gith avatar Feb 17 '24 10:02 rajat-gith

@rajat-gith I don't have authority to assign it to you. I suggest you just fix it and then submit a pull request.

ghost avatar Feb 20 '24 16:02 ghost

Addressed in https://github.com/swagger-api/swagger-ui/pull/9639

glowcloud avatar May 08 '24 06:05 glowcloud