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#1904][MAS2.4.3][Focus Order - Endpoint] Focus order is not logical under "Azure bot service configuration" dropdown #1983

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,14 @@ export class EndpointEditor extends Component<EndpointEditorProps, EndpointEdito
data-prop="serviceName"
value={serviceName}
label="Azure BotId"
tabIndex={-1}
/>
<TextField
onChange={this.onBotInputChange}
data-prop="tenantId"
value={tenantId}
label="Azure Directory ID"
tabIndex={-1}
/>
</Row>
<Row className={styles.absTextFieldRow}>
Expand All @@ -206,12 +208,14 @@ export class EndpointEditor extends Component<EndpointEditorProps, EndpointEdito
value={subscriptionId}
data-prop="subscriptionId"
label="Azure Subscription ID"
tabIndex={-1}
/>
<TextField
data-prop="resourceGroup"
onChange={this.onBotInputChange}
value={resourceGroup}
label="Azure Resource Group"
tabIndex={-1}
/>
</Row>
</div>
Expand Down Expand Up @@ -303,6 +307,11 @@ export class EndpointEditor extends Component<EndpointEditorProps, EndpointEdito
const newHeight = expanded ? clientHeight : 0;
this.absContent.style.height = `${newHeight}px`;
currentTarget.setAttribute('aria-expanded', expanded + '');
this.absContent.querySelectorAll('input').forEach((node: HTMLElement) => {
if (node.hasAttribute('tabIndex')) {
node.setAttribute('tabIndex', expanded ? '0' : '-1');
}
});
};

private absContentRef = (ref: HTMLDivElement): void => {
Expand Down