From 2af880025a65947955978ff494f8d1cae21ca7c3 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Tue, 28 Apr 2020 09:02:38 +0100 Subject: [PATCH] Revert "Add role="table" to TableBlock output" (#5977) --- CHANGELOG.txt | 1 + docs/releases/2.10.rst | 1 + .../templates/table_block/blocks/table.html | 2 +- wagtail/contrib/table_block/tests.py | 16 ++++++++-------- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7918408139..262a72e2b1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ Changelog * `AbstractEmailForm` now has a separate method (`render_email`) to build up email content on submission emails (Haydn Greatnews) * Fix: Ensure link to add a new user works when no users are visible in the users list (LB (Ben Johnston)) * Fix: `AbstractEmailForm` saved submission fields are now aligned with the email content fields, `form.cleaned_data` will be used instead of `form.fields` (Haydn Greatnews) + * Fix: Removed ARIA `role="table"` from TableBlock output (Thibaud Colas) 2.9 (xx.xx.xxxx) - IN DEVELOPMENT diff --git a/docs/releases/2.10.rst b/docs/releases/2.10.rst index 84622c2faa..9cb74d1ce0 100644 --- a/docs/releases/2.10.rst +++ b/docs/releases/2.10.rst @@ -27,6 +27,7 @@ Bug fixes * Ensure link to add a new user works when no users are visible in the users list (LB (Ben Johnston)) * ``AbstractEmailForm`` saved submission fields are now aligned with the email content fields, ``form.cleaned_data`` will be used instead of ``form.fields`` (Haydn Greatnews) + * Removed ARIA `role="table"` from TableBlock output (Thibaud Colas) Upgrade considerations diff --git a/wagtail/contrib/table_block/templates/table_block/blocks/table.html b/wagtail/contrib/table_block/templates/table_block/blocks/table.html index 116ede4271..081a071952 100644 --- a/wagtail/contrib/table_block/templates/table_block/blocks/table.html +++ b/wagtail/contrib/table_block/templates/table_block/blocks/table.html @@ -1,6 +1,6 @@ {% load table_block_tags %} - +
{% if table_caption %} {% endif %} diff --git a/wagtail/contrib/table_block/tests.py b/wagtail/contrib/table_block/tests.py index f340c58da1..958e9eb7fe 100644 --- a/wagtail/contrib/table_block/tests.py +++ b/wagtail/contrib/table_block/tests.py @@ -37,7 +37,7 @@ class TestTableBlock(TestCase): block = TableBlock() result = block.render(value) expected = """ -
{{ table_caption }}
+
@@ -61,7 +61,7 @@ class TestTableBlock(TestCase): block = TableBlock() result = block.render(value) expected = """ -
Test 1Test 2Test 3
+
@@ -90,7 +90,7 @@ class TestTableBlock(TestCase): ] }) expected = """ -
Test 1Test 2Test 3
+
@@ -110,7 +110,7 @@ class TestTableBlock(TestCase): [None, None, None]]} expected = """ -
+
@@ -131,7 +131,7 @@ class TestTableBlock(TestCase): 'data': [['Foo', 'Bar', 'Baz'], [None, None, None], [None, None, None]]} expected = """ -
<p><strong>Test</strong></p>
+
@@ -153,7 +153,7 @@ class TestTableBlock(TestCase): 'data': [['Foo', 'Bar', 'Baz'], ['one', 'two', 'three'], ['four', 'five', 'six']]} expected = """ -
FooBarBaz
+
@@ -173,7 +173,7 @@ class TestTableBlock(TestCase): 'data': [['Foo', 'Bar', 'Baz'], ['one', 'two', 'three'], ['four', 'five', 'six']]} expected = """ -
FooBarBaz
onetwothree
+
@@ -258,7 +258,7 @@ class TestTableBlock(TestCase): block = TableBlock() result = block.render(value) expected = """ -
FooBarBaz
+
caption
Test 1Test 2Test 3