You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SwaggerUI({// your config options hereurl: "http://localhost:3000/openapi.json",// Example OpenAPI spec URLdom_id: '#swagger-ui',deepLinking: true,presets: [SwaggerUI.presets.apis,SwaggerUI.SwaggerUIStandalonePreset],plugins: [SwaggerUI.plugins.DownloadUrl],layout: "StandaloneLayout"})
?yourQueryStringConfig
Is your feature request related to a problem?
I am just feeling annoyed when links are embedded inside buttons in Swagger UI. This goes against HTML accessibility best practices and may cause confusion for users relying on assistive technologies (such as screen readers). Buttons should be used for actions while links should be used for navigation.
Describe the solution you'd like
I would like to see anchor () tags separated from buttons () in the Swagger UI codebase. This would align with best practices in HTML and improve accessibility. Buttons should trigger actions, while links should handle navigation. It would be great if Swagger UI could refactor its implementation to ensure anchor tags and buttons are not nested
Describe alternatives you've considered
An alternative solution could be to allow a configuration flag in Swagger UI settings to control the behavior of buttons and links. However, separating them semantically in the HTML structure seems like the best solution for improving accessibility and keeping the code clean.
Additional context
The issue can be observed in various parts of Swagger UI whether for POST, GET, PUT and DELETE, button or other action buttons that wrap anchor tags Inspecting these elements in the browser's developer tools shows that buttons contain anchor tags inside them, which is not recommended.
The text was updated successfully, but these errors were encountered:
Content & configuration
Swagger/OpenAPI definition:
# your YAML here
Swagger-UI configuration options:
Is your feature request related to a problem?
I am just feeling annoyed when links are embedded inside buttons in Swagger UI. This goes against HTML accessibility best practices and may cause confusion for users relying on assistive technologies (such as screen readers). Buttons should be used for actions while links should be used for navigation.
Describe the solution you'd like
I would like to see anchor () tags separated from buttons () in the Swagger UI codebase. This would align with best practices in HTML and improve accessibility. Buttons should trigger actions, while links should handle navigation. It would be great if Swagger UI could refactor its implementation to ensure anchor tags and buttons are not nested
Describe alternatives you've considered
An alternative solution could be to allow a configuration flag in Swagger UI settings to control the behavior of buttons and links. However, separating them semantically in the HTML structure seems like the best solution for improving accessibility and keeping the code clean.
Additional context
The issue can be observed in various parts of Swagger UI whether for POST, GET, PUT and DELETE, button or other action buttons that wrap anchor tags Inspecting these elements in the browser's developer tools shows that buttons contain anchor tags inside them, which is not recommended.
The text was updated successfully, but these errors were encountered: