From 3032f689b6f4c97cb20eba6738eec4be7a7febad Mon Sep 17 00:00:00 2001 From: vaidankarswapnil <81285216+vaidankarswapnil@users.noreply.github.com> Date: Fri, 17 Sep 2021 02:53:29 +0530 Subject: [PATCH] Fix delete container and database labels appearing text are not associated with the edit fields (#1072) * Fix a11y issues for delete container and database * Update test snapshot issues --- .../DeleteCollectionConfirmationPane.tsx | 4 ++++ .../DeleteCollectionConfirmationPane.test.tsx.snap | 3 +++ src/Explorer/Panes/DeleteDatabaseConfirmationPanel.tsx | 5 ++++- .../DeleteDatabaseConfirmationPanel.test.tsx.snap | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx b/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx index b09ac3eae..858ba3bc4 100644 --- a/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx +++ b/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx @@ -108,6 +108,8 @@ export const DeleteCollectionConfirmationPane: FunctionComponent
@@ -123,6 +125,7 @@ export const DeleteCollectionConfirmationPane: FunctionComponent { setInputCollectionName(newInput); }} + ariaLabel={confirmContainer} />
{shouldRecordFeedback() && ( @@ -142,6 +145,7 @@ export const DeleteCollectionConfirmationPane: FunctionComponent { setDeleteCollectionFeedback(newInput); }} + ariaLabel={reasonInfo} /> )} diff --git a/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap b/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap index 923557265..de359f986 100644 --- a/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap +++ b/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap @@ -40,6 +40,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect {!formError && } @@ -133,6 +134,7 @@ export const DeleteDatabaseConfirmationPanel: FunctionComponent { setDatabaseInput(newInput); }} + ariaLabel={confirmDatabase} /> {isLastNonEmptyDatabase() && ( @@ -151,6 +153,7 @@ export const DeleteDatabaseConfirmationPanel: FunctionComponent { setDatabaseFeedbackInput(newInput); }} + ariaLabel={reasonInfo} /> )} diff --git a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap index ca0868a35..9a2b6ef16 100644 --- a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap +++ b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap @@ -363,6 +363,7 @@ exports[`Delete Database Confirmation Pane Should call delete database 1`] = `