Skip to content
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

Implement table captions #3204

Closed
Reinmar opened this issue Jun 19, 2018 · 11 comments · Fixed by #9242
Closed

Implement table captions #3204

Reinmar opened this issue Jun 19, 2018 · 11 comments · Fixed by #9242
Assignees
Labels
domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. Epic package:table support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Reinmar
Copy link
Member

Reinmar commented Jun 19, 2018

Tables need to be captioned. Most likely, we can implement this just like in the image feature. It'd be also good to extract pieces of shared logic so #1065 is resolved.

Related comments:


If you'd like this feature implemented, please react with 👍 to this post.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-table Oct 9, 2019
@mlewand mlewand added this to the backlog milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:table labels Oct 9, 2019
@lslowikowska lslowikowska added the support:2 An issue reported by a commercially licensed client. label Dec 31, 2019
@Reinmar Reinmar modified the milestones: backlog, nice-to-have Feb 12, 2020
@alexander-schranz
Copy link
Contributor

alexander-schranz commented Apr 23, 2020

I hope this is the right issue to post this. The currently behaviour with adding a figure is from my side more annoying then good:

<figure class="table">
     <table>
         <!-- ... -->
     </table>
</figure>

The table itself does not need a figure because it is by itself like a figure it has its own <caption> tag. So this behaviour should definitly be changed or configureable that the real <caption> tag is used and not some wrapping with a figure tag some class name:

<table>
     <caption>Test</caption>

     <!-- ... -->
<table>

@Reinmar
Copy link
Member Author

Reinmar commented May 8, 2020

@alexander-schranz, we based on this research: https://ckeditor.github.io/editor-recommendations/features/table.html. If you're still unsure, please open a ticket in https://github.com/ckeditor/editor-recommendations/issues.

@marcellofuschi
Copy link
Contributor

Any plans to implement?

@Reinmar Reinmar added the squad:core Issue to be handled by the Core team. label Sep 21, 2020
@marcellofuschi
Copy link
Contributor

I need table captions for a project I'm working on. Shall I try to implement it and send a PR? You aren't working on it right now, are you?

@alexander-schranz
Copy link
Contributor

alexander-schranz commented Sep 22, 2020

@Reinmar The standard of the figure and figcaption tag is sure correctly interpreted, but for a table itself a figure and figcaption in html is not needed as the table itself has a caption tag which should be used instead of wrapping the table in a figure and add a caption. Would really be great to get rid of the figure around the table and use the real table caption instead, maybe this can be configurable to avoid bc breaks.

@marcellofuschi
Copy link
Contributor

marcellofuschi commented Sep 22, 2020

@alexander-schranz, I think the rationale for using <figure> is well explained here: #3194 (comment)

@alexander-schranz
Copy link
Contributor

@marcellofuschi thats sentence is definitly true for any textuel content, for the table itself it just doesn't make sense as the table itself is like a figure tag and have its own caption. Wrapping it again into a figure and caption should not be done aslong you don't have more then a table tag inside this figure tag.

@Reinmar Reinmar removed the squad:core Issue to be handled by the Core team. label Oct 8, 2020
@ktwbc
Copy link

ktwbc commented Feb 16, 2021

Has there been any further work on this? We are failing accessibility testing because of this.

@Reinmar
Copy link
Member Author

Reinmar commented Feb 18, 2021

Some notes regarding the scope:

  • Adding toolbar button (could be moved from the image caption),
  • Adding/removing element to the model + conversion,
    • note: caption can only be the first element in a table, so we may simplify its conversion and any model rules with that rule in mind,
    • note: in the upcast conversion we need to support figure>figcaption and table>caption,
    • note: we want to follow editor recommendations (figure>figcaption); see: https://html.spec.whatwg.org/multipage/tables.html#the-caption-element
  • Updating algorithms,
  •  Selection (multi-cell),
  • Copy/cut/paste,
  • Update styles,
  • Documentation

@maxbarnas maxbarnas self-assigned this Feb 22, 2021
@Reinmar Reinmar modified the milestones: nice-to-have, iteration 40 Feb 23, 2021
@maxbarnas maxbarnas added the Epic label Feb 24, 2021
@maxbarnas maxbarnas added Epic and removed Epic labels Feb 24, 2021
@Reinmar
Copy link
Member Author

Reinmar commented Feb 25, 2021

Has there been any further work on this? We are failing accessibility testing because of this.

We've just started working on this 👍

@ktwbc
Copy link

ktwbc commented Mar 1, 2021

Not sure if this is in scope or not but if captions are being added as part of accessibility then scope=row and those attributes are in that same wheelhouse would be beneficial as well.

@Reinmar Reinmar added domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. and removed domain:v4-compatibilty labels Mar 9, 2021
@Mgsy Mgsy modified the milestones: iteration 41, iteration 42 Mar 17, 2021
@Mgsy Mgsy modified the milestones: iteration 42, iteration 43 Apr 15, 2021
niegowski added a commit that referenced this issue May 7, 2021
Feature (table): Added support for table captions. Closes #3204.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:v4-compatibility This issue reports a CKEditor 4 feature/option that's missing in CKEditor 5. Epic package:table support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants