mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400)
This commit is contained in:
parent
5e394c0385
commit
ef32050508
@ -1,4 +1,5 @@
|
||||
import { cx } from '@emotion/css';
|
||||
import { FocusScope } from '@react-aria/focus';
|
||||
import React, { PureComponent } from 'react';
|
||||
import { connect, ConnectedProps } from 'react-redux';
|
||||
|
||||
@ -371,7 +372,13 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> {
|
||||
<DashboardGrid dashboard={dashboard} viewPanel={viewPanel} editPanel={editPanel} />
|
||||
|
||||
{inspectPanel && <PanelInspector dashboard={dashboard} panel={inspectPanel} />}
|
||||
{editPanel && <PanelEditor dashboard={dashboard} sourcePanel={editPanel} tab={this.props.queryParams.tab} />}
|
||||
{editPanel && (
|
||||
<FocusScope contain autoFocus restoreFocus>
|
||||
<section>
|
||||
<PanelEditor dashboard={dashboard} sourcePanel={editPanel} tab={this.props.queryParams.tab} />
|
||||
</section>
|
||||
</FocusScope>
|
||||
)}
|
||||
</Page>
|
||||
{queryParams.editview && (
|
||||
<DashboardSettings
|
||||
|
Loading…
Reference in New Issue
Block a user