mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-24 14:36:54 +00:00
Screen Reader does not announce status message after invoking 'Add Row' control under 'Add Table Row' pane. (#1837)
* [accessibility-3100026]: [Screen Reader - Azure Cosmos DB - Add Table Row]: Screen Reader does not announce status message after invoking 'Add Row' control under 'Add Table Row' pane. * Fixed format. * Snap update. --------- Co-authored-by: Satyapriya Bai <v-satybai@microsoft.com>
This commit is contained in:
parent
9e9d270b65
commit
b6e3e5ea1c
@ -336,3 +336,10 @@
|
||||
height: 0;
|
||||
border-color: @InfoPointerColor transparent;
|
||||
}
|
||||
/*********************************************************************************************************
|
||||
Screen Reader Only
|
||||
**********************************************************************************************************/
|
||||
.screenReaderOnly {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
@ -2140,6 +2140,11 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</DeleteCollectionConfirmationPane>
|
||||
`;
|
||||
|
@ -7073,6 +7073,11 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</ExecuteSprocParamsPane>
|
||||
`;
|
||||
|
@ -2,6 +2,7 @@ import React, { CSSProperties, FunctionComponent, ReactNode } from "react";
|
||||
import { PanelFooterComponent } from "../PanelFooterComponent";
|
||||
import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent";
|
||||
import { PanelLoadingScreen } from "../PanelLoadingScreen";
|
||||
import { labelToLoadingItemName } from "Explorer/Tables/Constants";
|
||||
|
||||
export interface RightPaneFormProps {
|
||||
formError: string;
|
||||
@ -27,6 +28,10 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
|
||||
const handleOnSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
onSubmit();
|
||||
const screenReaderStatusElement = document.getElementById("screenReaderStatus");
|
||||
if (screenReaderStatusElement) {
|
||||
screenReaderStatusElement.innerHTML = labelToLoadingItemName[submitButtonText] || "Loading";
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
@ -42,6 +47,7 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
|
||||
/>
|
||||
)}
|
||||
</form>
|
||||
<span role="status" className="screenReaderOnly" id="screenReaderStatus"></span>
|
||||
{isExecuting && <PanelLoadingScreen />}
|
||||
</>
|
||||
);
|
||||
|
@ -1782,5 +1782,10 @@ exports[`Right Pane Form should render Default properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
`;
|
||||
|
@ -2449,6 +2449,11 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</StringInputPane>
|
||||
`;
|
||||
|
@ -3019,6 +3019,11 @@ exports[`Table query select Panel should render Default properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</TableQuerySelectPanel>
|
||||
`;
|
||||
|
@ -2130,6 +2130,11 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</AddTableEntityPanel>
|
||||
`;
|
||||
|
@ -2136,6 +2136,11 @@ exports[`Excute Edit Table Entity Pane should render Default properly 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</EditTableEntityPanel>
|
||||
`;
|
||||
|
@ -2810,6 +2810,11 @@ exports[`Delete Database Confirmation Pane Should call delete database 1`] = `
|
||||
</div>
|
||||
</PanelFooterComponent>
|
||||
</form>
|
||||
<span
|
||||
className="screenReaderOnly"
|
||||
id="screenReaderStatus"
|
||||
role="status"
|
||||
/>
|
||||
</RightPaneForm>
|
||||
</DeleteDatabaseConfirmationPanel>
|
||||
`;
|
||||
|
@ -225,3 +225,8 @@ export const InputType = {
|
||||
DateTime: "datetime-local",
|
||||
Number: "number",
|
||||
};
|
||||
|
||||
export const labelToLoadingItemName: Record<string, string> = {
|
||||
"Add Row": "Adding row to table",
|
||||
"Add Entity": "Adding entity to table",
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user