I wanted to ask a question about creating accessible expand/collapse tables. I am trying to create a table with expandable rows that is accessible via screen reader. Here is essentially what we are trying to accomplish:
We were able to create table that does this using JQuery, but there are several accessibility issues in the design. These include:
1. How can I show the relationship between the initial row (includes 3 cells) and the expanded row to the screen reader?
Would it work to make the first column a header with a unique id and reference this in the expanded row? Or is this confusing because technically the expanded row is associated to the entire initial row (not just the first cell)?
2. How does the screen reader know what has been expanded?
Are there any aria attributes that could help accomplish this?
and now for the big question...
3. Is this design inherently inaccessible?
When the screen reader access the button (on the left) to perform the expand/collapse; it hasn't yet read any of the cells (to the right) related to new expanded row (e.g. item 1, item 2, item 3). This means that a screen reader user is forced to request more information before they have a chance to read the initial row. Is there any way to fix this so that screen readers have the opportunity to read the entire row before they expand for more information? Is the only solution to have the expand/collapse button at the end of the table?
