Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE#1889][MAS4.2.10][Screen Reader-Open bot dialog] Keyboard focus and voiceover focus is not synchronized. #1995

Merged
merged 19 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1992](https://github.com/microsoft/BotFramework-Emulator/pull/1992)
- [1993](https://github.com/microsoft/BotFramework-Emulator/pull/1993)
- [1994](https://github.com/microsoft/BotFramework-Emulator/pull/1994)
- [1995](https://github.com/microsoft/BotFramework-Emulator/pull/1995)
- [1997](https://github.com/microsoft/BotFramework-Emulator/pull/1997)
- [1999](https://github.com/microsoft/BotFramework-Emulator/pull/1999)
- [2000](https://github.com/microsoft/BotFramework-Emulator/pull/2000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class AzureLoginPromptDialog extends Component<AzureLoginPromptDialogProp
public render() {
return (
<Dialog cancel={this.props.cancel} title="Sign in with an Azure account" className={styles.dialogMedium}>
<p>
<p role="presentation">
{'Use your Azure account to sign in to all your Azure services, ' +
'such as Azure Bot Service, Dispatch, LUIS, and QnA Maker. '}
<LinkButton className={styles.dialogLink} linkRole={true} onClick={this.onSignUpLinkClick}>
Expand All @@ -57,7 +57,7 @@ export class AzureLoginPromptDialog extends Component<AzureLoginPromptDialogProp
{'By signing in to your services, you can register any app in that ' +
'service with your bot without having to enter in credentials manually.'}
</p>
<p>
<p role="presentation">
<LinkButton className={styles.dialogLink} linkRole={true} onClick={this.onRegisterServicesLinkClick}>
Learn more about registering services
</LinkButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get luisContent(): ReactNode {
return (
<>
<p>
<p role="presentation">
{`Sign in to your Azure account to select the LUIS applications you'd like to associate with this bot. `}
<LinkButton linkRole={true} onClick={this.onLuisDocsClick}>
Learn more about LUIS.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}
<LinkButton onClick={this.props.addServiceManually}>add a LUIS app manually</LinkButton>
{` with the app ID, version, and authoring key.`}
Expand All @@ -130,14 +130,14 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get qnaContent(): JSX.Element {
return (
<>
<p>
<p role="presentation">
{'Sign in to your Azure account to select the QnA ' +
"Maker knowledge bases you'd like to associate with this bot. "}
<LinkButton linkRole={true} onClick={this.onQnADocsClick}>
Learn more about QnA Maker.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}{' '}
<LinkButton onClick={this.props.addServiceManually}>
connect to a QnA Maker knowledge base manually
Expand All @@ -151,13 +151,13 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get dispatchContent(): JSX.Element {
return (
<>
<p>
<p role="presentation">
{`Sign in to your Azure account to select the Dispatch model you'd like to associate with this bot. `}
<LinkButton linkRole={true} onClick={this.onDispatchDocsClick}>
Learn more about Dispatch models.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}
<LinkButton onClick={this.props.addServiceManually}>connect to a Dispatch model manually</LinkButton>
{` with the app ID, version, and authoring key.`}
Expand All @@ -169,14 +169,14 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get appInsightsContent(): JSX.Element {
return (
<>
<p>
<p role="presentation">
{'Sign in to your Azure account to select the Azure Application ' +
"Insights you'd like to associate with this bot. "}
<LinkButton linkRole={true} onClick={this.onAppInsightsClick}>
Learn more about Azure Application Insights.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}
<LinkButton onClick={this.props.addServiceManually}>
connect to a Azure Application Insights manually
Expand All @@ -190,14 +190,14 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get blobStorageContent(): ReactNode {
return (
<>
<p>
<p role="presentation">
{'Sign in to your Azure account to select the Azure Storage ' +
"accounts you'd like to associate with this bot. "}
<LinkButton linkRole={true} onClick={this.onAzureStorageDocsClick}>
Learn more about Azure Storage.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}
<LinkButton onClick={this.props.addServiceManually}>connect to a Azure Storage account manually.</LinkButton>
</p>
Expand All @@ -208,14 +208,14 @@ export class ConnectServicePromptDialog extends Component<ConnectServicePromptDi
private get cosmosDbContent(): ReactNode {
return (
<>
<p>
<p role="presentation">
{'Sign in to your Azure account to select the Azure Cosmos DB ' +
"accounts you'd like to associate with this bot. "}
<LinkButton linkRole={true} onClick={this.onAzureCosmosDbDocsClick}>
Learn more about Azure Cosmos DB.
</LinkButton>
</p>
<p>
<p role="presentation">
{`Alternatively, you can `}
<LinkButton onClick={this.props.addServiceManually}>
connect to a Azure Cosmos DB account manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
//

.browse-button {
position: relative;
margin-left: 8px;
bottom: 1px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export class OpenBotDialog extends Component<OpenBotDialogProps, OpenBotDialogSt

return (
<Dialog cancel={this.props.onDialogCancel} className={openBotStyles.themeOverrides} title="Open a bot">
<form id="open-bot-dialog" onSubmit={this.onSubmit}>
<div className={openBotStyles.autoCompleteBar}>
<form id="open-bot-dialog" role="presentation" onSubmit={this.onSubmit}>
<div className={openBotStyles.autoCompleteBar} role="presentation">
<AutoComplete
autoFocus={true}
errorMessage={errorMessage}
Expand Down Expand Up @@ -239,7 +239,9 @@ export class OpenBotDialog extends Component<OpenBotDialogProps, OpenBotDialogSt
return (
<div className={openBotStyles.browseButton}>
<input accept=".bot" id="openBotBrowse" name="botUrl" onChange={this.onInputChange} type="file" />
<label htmlFor="openBotBrowse">Browse</label>
<label htmlFor="openBotBrowse" aria-hidden="true">
Browse
</label>
</div>
);
}
Expand Down
24 changes: 12 additions & 12 deletions packages/app/client/src/ui/editor/welcomePage/howToBuildABot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
<div className={styles.section}>
<div className={styles.howToBuildSection}>
<SmallHeader className={styles.howToTitle}>How to build a bot</SmallHeader>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan01} />
</div>
<div className={styles.stepSection}>
<p className={styles.stepHeader}>Plan:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
Review the bot&nbsp;
<LinkButton
ariaLabel={'Learn more about design guidelines.'}
Expand All @@ -69,13 +69,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
</p>
</div>
</div>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan02} />
</div>
<div className={styles.stepSection}>
<p className={styles.stepHeader}>Build:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
<LinkButton linkRole={true} onClick={this.onEmulatorToolsLinkClick}>
Download Command Line tools
</LinkButton>
Expand Down Expand Up @@ -117,13 +117,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
</p>
</div>
</div>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan03} />
</div>
<div className={styles.stepSection}>
<p className={`${styles.stepHeader} ${styles.testBullet}`}>Test:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
Test with the&nbsp;
<LinkButton
ariaLabel={'Test your bot on the Emulator.'}
Expand All @@ -144,13 +144,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
</p>
</div>
</div>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan04} />
</div>
<div className={styles.stepSection}>
<p className={styles.stepHeader}>Publish:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
Publish directly to Azure or
<br />
Use&nbsp;
Expand All @@ -165,13 +165,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
</p>
</div>
</div>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan05} />
</div>
<div className={styles.stepSection}>
<p className={styles.stepHeader}>Connect:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
Connect to&nbsp;
<LinkButton
ariaLabel={'Learn more connecting to channels.'}
Expand All @@ -184,13 +184,13 @@ export class HowToBuildABot extends React.Component<HowToBuildABotProps, {}> {
</p>
</div>
</div>
<div className={styles.stepContainer}>
<div className={styles.stepContainer} role="presentation">
<div className={styles.stepIcon}>
<div className={styles.buildPlan06} />
</div>
<div className={styles.stepSection}>
<p className={styles.stepHeader}>Evaluate:</p>
<p className={styles.stepContent}>
<p className={styles.stepContent} role="presentation">
<LinkButton linkRole={true} onClick={this.onAnalyticsLinkClick}>
View analytics
</LinkButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp
private get luisAndDispatchHeader(): ReactNode {
const { serviceType } = this.props;
return (
<p>
<p role="presentation">
{`You can find your LUIS app ID and subscription key in ${portalMap[serviceType]}. `}
{this.learnMoreLinkButton}
</p>
Expand All @@ -244,7 +244,7 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp
const { serviceType } = this.props;

return (
<p>
<p role="presentation">
{`You can find your knowledge base ID and subscription key in ${portalMap[serviceType]}. `}
{this.learnMoreLinkButton}
</p>
Expand All @@ -253,7 +253,7 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp

private get appInsightsAndBlobStorageHeader(): ReactNode {
return (
<p>
<p role="presentation">
{`You can find your knowledge base ID and subscription key in the `}
<LinkButton className={styles.link} linkRole={true} onClick={this.onAzurePortalClick}>
Azure Portal.
Expand All @@ -266,7 +266,7 @@ export class ConnectedServiceEditor extends Component<ConnectedServiceEditorProp

private get cosmosDbHeader(): ReactNode {
return (
<p>
<p role="presentation">
{`You can find the information below in the `}
<LinkButton className={styles.link} linkRole={true} onClick={this.onAzurePortalClick}>
Azure Portal.
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/ui-react/src/widget/textField/textField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class TextField extends Component<TextFieldProps, {}> {
inputClassName += styles.invalid;
}
return (
<div className={`${styles.inputContainer} ${inputContainerClassName}`}>
<div className={`${styles.inputContainer} ${inputContainerClassName}`} role="presentation">
{this.labelNode}
<input
aria-label={errorMessage ? this.props.label + ', ' + errorMessage : undefined}
Expand Down