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

a11y: Embedded data table of output schema is not accessible

Open ghost opened this issue 1 year ago • 1 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

We are using a tool called Sort Site to evaluate our site for 508 accessibility compliance. It is flagging the nested table in the output schema: "This page uses nested tables, which do not make sense when read in a screen reader. Add "role=presentation" if the inner table is a layout table; otherwise modify the inner table to present the same data without nesting tables." Violates WCAG 2.0 A F9 https://www.w3.org/TR/WCAG20-TECHS/F49.html This is occurring on the "table class=model" embedded in a containing "table class=model".

The inner table also has the error "identify row and column headers in data tables using "th" elements and mark layout tables with "role=pagination." Violates WCAG 2.0 A F91 https://www.w3.org/TR/WCAG20-TECHS/F91.html

To reproduce...

Expand Schemas, expand an output schema, expand the result which contains an array

Expected behavior

No accessibility error

Screenshots

Here's the screen shot of the element where it is occuring image

Here's the error from Sort Site image

Additional context or thoughts

ghost avatar Feb 14 '24 17:02 ghost

@cjfreedman I just wanted to say a big THANK YOU for taking the time to enter all of these accessibility issues!

maggiewachs avatar Mar 15 '24 15:03 maggiewachs