mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-28 16:36:46 +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;
|
height: 0;
|
||||||
border-color: @InfoPointerColor transparent;
|
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>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</DeleteCollectionConfirmationPane>
|
</DeleteCollectionConfirmationPane>
|
||||||
`;
|
`;
|
||||||
|
@ -7073,6 +7073,11 @@ exports[`Excute Sproc Param Pane should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</ExecuteSprocParamsPane>
|
</ExecuteSprocParamsPane>
|
||||||
`;
|
`;
|
||||||
|
@ -2,6 +2,7 @@ import React, { CSSProperties, FunctionComponent, ReactNode } from "react";
|
|||||||
import { PanelFooterComponent } from "../PanelFooterComponent";
|
import { PanelFooterComponent } from "../PanelFooterComponent";
|
||||||
import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent";
|
import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent";
|
||||||
import { PanelLoadingScreen } from "../PanelLoadingScreen";
|
import { PanelLoadingScreen } from "../PanelLoadingScreen";
|
||||||
|
import { labelToLoadingItemName } from "Explorer/Tables/Constants";
|
||||||
|
|
||||||
export interface RightPaneFormProps {
|
export interface RightPaneFormProps {
|
||||||
formError: string;
|
formError: string;
|
||||||
@ -27,6 +28,10 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
|
|||||||
const handleOnSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
const handleOnSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
onSubmit();
|
onSubmit();
|
||||||
|
const screenReaderStatusElement = document.getElementById("screenReaderStatus");
|
||||||
|
if (screenReaderStatusElement) {
|
||||||
|
screenReaderStatusElement.innerHTML = labelToLoadingItemName[submitButtonText] || "Loading";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -42,6 +47,7 @@ export const RightPaneForm: FunctionComponent<RightPaneFormProps> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
|
<span role="status" className="screenReaderOnly" id="screenReaderStatus"></span>
|
||||||
{isExecuting && <PanelLoadingScreen />}
|
{isExecuting && <PanelLoadingScreen />}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -1782,5 +1782,10 @@ exports[`Right Pane Form should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
`;
|
`;
|
||||||
|
@ -2449,6 +2449,11 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</StringInputPane>
|
</StringInputPane>
|
||||||
`;
|
`;
|
||||||
|
@ -3019,6 +3019,11 @@ exports[`Table query select Panel should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</TableQuerySelectPanel>
|
</TableQuerySelectPanel>
|
||||||
`;
|
`;
|
||||||
|
@ -2130,6 +2130,11 @@ exports[`Excute Add Table Entity Pane should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</AddTableEntityPanel>
|
</AddTableEntityPanel>
|
||||||
`;
|
`;
|
||||||
|
@ -2136,6 +2136,11 @@ exports[`Excute Edit Table Entity Pane should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</EditTableEntityPanel>
|
</EditTableEntityPanel>
|
||||||
`;
|
`;
|
||||||
|
@ -2810,6 +2810,11 @@ exports[`Delete Database Confirmation Pane Should call delete database 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</PanelFooterComponent>
|
</PanelFooterComponent>
|
||||||
</form>
|
</form>
|
||||||
|
<span
|
||||||
|
className="screenReaderOnly"
|
||||||
|
id="screenReaderStatus"
|
||||||
|
role="status"
|
||||||
|
/>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
</DeleteDatabaseConfirmationPanel>
|
</DeleteDatabaseConfirmationPanel>
|
||||||
`;
|
`;
|
||||||
|
@ -225,3 +225,8 @@ export const InputType = {
|
|||||||
DateTime: "datetime-local",
|
DateTime: "datetime-local",
|
||||||
Number: "number",
|
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