Currently when you enable Editing mode, leave editing mode and then enable it again.
The announcement message is wrong.

ChromeVox reads:

Tabbing is no longer constrained by the Contextual module.
Tabbing is constrained to a set of 11 contextual links and the edit mode toggle.
Press the esc key to exit.

This should just be:

Tabbing is constrained to a set of 11 contextual links and the edit mode toggle.
Press the esc key to exit.

Comments

dmsmidt created an issue. See original summary.

dmsmidt’s picture

Status: Active » Needs review
FileSize
838 bytes

Here is a patch that fixes the problem.

drpal’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

I think this should be testable.

tedbow’s picture

Title: Outside-in Accessibility: Announcement broken after enabling editing mode a second time » Contextual Accessibility: Announcement broken after enabling editing mode a second time
Component: outside_in.module » contextual.module

This actually happens with the Contextual module without the Settings Tray module enabled. So switching component. I will work on a test for this.

tedbow’s picture

Status: Needs work » Needs review
FileSize
3.98 KB
3.16 KB

Ok I added a test to the patch. I also added a TEST_ONLY patch.

The TEST_ONLY patch should fail as

1) Drupal\Tests\contextual\FunctionalJavascript\EditModeTest::testAnnounceEditMode
Behat\Mink\Exception\ElementHtmlException: The string "Tabbing is no longer constrained by the Contextual module." appears in the HTML of the element matching css "#drupal-live-announce", but it should not.

........
/var/www/d8_2_ux/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php:61

So line 61 is when edit mode has been enabled and disabled then re-enabled.

This should prove the problem and the fix.

Status: Needs review » Needs work

The last submitted patch, 5: 2863222-5-TEST_ONLY.patch, failed testing.

tedbow’s picture

Status: Needs work » Needs review

Forgot to upload TEST_ONLY first, regular patch passed.

dmsmidt’s picture

Test looks good and works as advertised.

+++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
@@ -0,0 +1,97 @@
+    $this->pressToolbarEditButton();
+    $this->assertAnnounceEditMode();
+    $this->pressToolbarEditButton();
+    $this->assertAnnounceLeaveEditMode();
+    $this->pressToolbarEditButton();
+    $this->assertAnnounceEditMode();

This benefits from some extra documentation. Patch attached.

Edit: booo, something went wrong here. New patch comming up. (Note to self: Check first, upload later)

Status: Needs review » Needs work

The last submitted patch, 8: 2863222-8.patch, failed testing.

dmsmidt’s picture

Status: Needs work » Needs review
FileSize
874 bytes
4.2 KB