-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users cannot add table metadata in the visual editor #15283
Comments
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. |
Here's a PR for the table caption: #15554 |
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 |
The PR, #15554, looks ready for merging. I'll drop the label for design feedback. Excellent work! |
I believe so! |
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:
Also, the |
I'm not totally convinced that this should have been closed, although the letter of the issue is resolved. Regardless, I agree that there should be a follow-up issue to iterate on this. It should be possible to define table row headers, not just a thead with column-scoped headers.
|
I think a follow-up issue would be great! Thank you 👍 |
Users cannot add table metadata in the visual editor
Issue description
Authors using the visual editor can create a table, however the table
which results is only a series of rows and columns with no column-header
information, which may cause assistive technologies to assume these are
layout tables rather than data tables.
Users appear to be only able to add table headers by switching to the
HTML view. However not all authors have HTML knowledge and so may be
producing inaccessible tables.
Authors attempting to add table semantics such as a
<caption>
element are shown an error, which may cause people using the editor to
think these are real errors.
Issue Code
Remediation Guidance
Make the default Table block type assume that the first row is a header
row. This assumption is similar to what CSV files do, and will help
content authors create semantic tables despite any lack of HTML
knowledge.
Allow users to use the HTML editor to add in other semantics, such as
<caption>
elements orscope
attributes, without showing theseas errors to users.
Recommended Code
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
The text was updated successfully, but these errors were encountered: