Table captions should display as `table-caption`, not `block`

Summary

When using a grouping field on a table view, the group will be rendered inside the table's caption. Currently the theme is displaying the <caption> tag as a block, which results in the table being split in half (see attached image no.1).

Steps to reproduce

Create a view of format Table, add some fields, and on the Settings section, choose any field as 'Grouping field Nr.1'. Preview shows grouping headers just fine, but when the view is shown through the CERN theme, the grouping headers will be rendered visually inside the table, between the header and the body rows.

Possible fixes

Here is the line that assigns display: block to a table caption:

https://gitlab.cern.ch/web-team/drupal/public/d8/themes/cernbase/-/blob/master/sass/theme.scss#L1078

When changed to display: table-caption the issue disappears (see attached image no.2)

Attachments

Image 1 (problem)

image

Image 2 (solution)

image

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information