From 66a865b44c4c2e04c732498e38758ba719c6678a Mon Sep 17 00:00:00 2001 From: Mike Crantea Date: Tue, 18 Jul 2017 23:19:32 +0300 Subject: [PATCH] Insert link accessibility (#1933) * Insert link accessibility ## Description Fixes #694 by improving the screen reader accessibility of the element. My updates apply to the add link and edit link pop-out elements, handling the following aspects: - The buttons (Apply, Edit, Remove) now have the aria-label attribute added in for accessibility purposes. There is no visual change for them. - The URL input now has an ID that makes use of the withInstanceId feature from components - The URL input now has a screen-reader-text label which uses the ID on the for attribute to improve the screen reader accessibility of the element. This label is not visible. ## How Has This Been Tested? I used the browser's inspector (screenshots reflect that) to confirm the presence of the a11y attributes and screen-reader-text elements on both the add link and edit link forms. The updates done in blocks/editable/format-toolbar.js were visible in the add link / edit existing link workflow in the text block, just like the screenshots show. I wasn't able to figure out where is the "blocks/library/button/index.js" actually used. It has in the edit function a form with a class of editable-format-toolbar__link-modal, just like the one generated with the insert/edit URL. Locally only I tried adding an extra class on the form.editable-format-toolbar__link-modal and trying to hunt it in the browser, but I wasn't able to stumble upon it myself. That's why the changes done on that file are minimal (added the button aria-label and added a