Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Users cannot add table metadata in the visual editor #15283
Users cannot add table metadata in the visual editor
Authors using the visual editor can create a table, however the table
Users appear to be only able to add table headers by switching to the
Authors attempting to add table semantics such as a
Make the default Table block type assume that the first row is a header
Allow users to use the HTML editor to add in other semantics, such as
Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-103 in Tenon's report
This is a long standing issues and an accessibility priority to empower users to produce accessible content. See #6923 which incorporates #1470 (June 2017). Almost 2 years from the original report and still no method to define table headers.
At some point it was also suggested to discourage the usage of tabes, see #1470 (comment)
I've started working on an a PR (#15409) to add table header and footers to the table block. Needs some finessing, but I don't see any major blockers to getting it merged.
I haven't marked it as closing this issue as this also mentions adding captions to tables. I could potentially roll that into the PR, but I might just tackle it on a separate PR.
After the caption PR is merged the main thing remaining (afaik) is the supporting the ability to add
The main thing at the moment would be to ensure those scope attributes aren't stripped off or that they don't cause an invalid block if a table is pasted in, or the html is manually edited.
At the moment the table implementation isn't really sophisticated enough to handle headers outside of a
Thinking a follow-up issue should be created for further iterations. At the moment, the table block implementation is still pretty basic. Some important semantics can only by added by editing the HTML: