From 47886f841a1ea5161470394e319da9ba351cd6fe Mon Sep 17 00:00:00 2001 From: jackahl <44289551+jackahl@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:17:37 +0200 Subject: [PATCH] Increased contrast in table block for a11y reasons (#6333) --- packages/volto/cypress/tests/core/blocks/blocks-table.js | 2 +- packages/volto/news/2487.bugfix | 1 + packages/volto/news/6334.bugfix | 1 + .../theme/themes/pastanaga/collections/table.overrides | 7 ++++++- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 packages/volto/news/2487.bugfix create mode 100644 packages/volto/news/6334.bugfix diff --git a/packages/volto/cypress/tests/core/blocks/blocks-table.js b/packages/volto/cypress/tests/core/blocks/blocks-table.js index 43c5f3ee26..97f00622e1 100644 --- a/packages/volto/cypress/tests/core/blocks/blocks-table.js +++ b/packages/volto/cypress/tests/core/blocks/blocks-table.js @@ -29,7 +29,7 @@ describe('Table Block Tests', () => { cy.get('.block-editor-slateTable [role=textbox]') .first() .click() - .should('have.css', 'outline', 'rgb(135, 143, 147) none 0px'); + .should('have.css', 'outline', 'rgba(0, 0, 0, 0.87) none 0px'); cy.get( '.celled.fixed.table thead tr th:first-child() [contenteditable="true"]', diff --git a/packages/volto/news/2487.bugfix b/packages/volto/news/2487.bugfix new file mode 100644 index 0000000000..41812d2d99 --- /dev/null +++ b/packages/volto/news/2487.bugfix @@ -0,0 +1 @@ +Increase specificity of table header style selector to properly override colors for better contrast @jackahl diff --git a/packages/volto/news/6334.bugfix b/packages/volto/news/6334.bugfix new file mode 100644 index 0000000000..f7623395d6 --- /dev/null +++ b/packages/volto/news/6334.bugfix @@ -0,0 +1 @@ +Use lighter blue as link color in inverted tables to improve contrast for a11y @jackahl diff --git a/packages/volto/theme/themes/pastanaga/collections/table.overrides b/packages/volto/theme/themes/pastanaga/collections/table.overrides index 477a761991..15181c1a05 100644 --- a/packages/volto/theme/themes/pastanaga/collections/table.overrides +++ b/packages/volto/theme/themes/pastanaga/collections/table.overrides @@ -6,7 +6,7 @@ } /* Headers */ -.ui.table th { +.ui.table thead th { padding: @headerVerticalPadding @headerHorizontalPadding; border-left: @headerDivider; background: @headerBackground; @@ -34,3 +34,8 @@ .ui.table tr:first-child > th:only-child { border-radius: @borderRadius @borderRadius 0em 0em; } + +/* inline link color*/ +.ui.table.inverted a { + color: @lightPrimaryColor; +}