7
7
import './frame_layout.scss' ;
8
8
9
9
import React from 'react' ;
10
- import { EuiPage , EuiPageSideBar , EuiPageBody } from '@elastic/eui' ;
10
+ import { EuiPage , EuiPageBody , EuiScreenReaderOnly } from '@elastic/eui' ;
11
+ import { i18n } from '@kbn/i18n' ;
11
12
12
13
export interface FrameLayoutProps {
13
14
dataPanel : React . ReactNode ;
@@ -19,16 +20,46 @@ export interface FrameLayoutProps {
19
20
export function FrameLayout ( props : FrameLayoutProps ) {
20
21
return (
21
22
< EuiPage className = "lnsFrameLayout" >
22
- < div className = "lnsFrameLayout__pageContent" >
23
- < EuiPageSideBar className = "lnsFrameLayout__sidebar" > { props . dataPanel } </ EuiPageSideBar >
24
- < EuiPageBody className = "lnsFrameLayout__pageBody" restrictWidth = { false } >
23
+ < EuiPageBody
24
+ restrictWidth = { false }
25
+ className = "lnsFrameLayout__pageContent"
26
+ aria-labelledby = "lns_ChartTitle"
27
+ >
28
+ < section className = "lnsFrameLayout__sidebar" aria-labelledby = "dataPanelId" >
29
+ < EuiScreenReaderOnly >
30
+ < h2 id = "dataPanelId" >
31
+ { i18n . translate ( 'xpack.lens.section.dataPanelLabel' , {
32
+ defaultMessage : 'Data panel' ,
33
+ } ) }
34
+ </ h2 >
35
+ </ EuiScreenReaderOnly >
36
+ { props . dataPanel }
37
+ </ section >
38
+ < section className = "lnsFrameLayout__pageBody" aria-labelledby = "workspaceId" >
39
+ < EuiScreenReaderOnly >
40
+ < h2 id = "workspaceId" >
41
+ { i18n . translate ( 'xpack.lens.section.workspaceLabel' , {
42
+ defaultMessage : 'Visualization workspace' ,
43
+ } ) }
44
+ </ h2 >
45
+ </ EuiScreenReaderOnly >
25
46
{ props . workspacePanel }
26
47
{ props . suggestionsPanel }
27
- </ EuiPageBody >
28
- < EuiPageSideBar className = "lnsFrameLayout__sidebar lnsFrameLayout__sidebar--right" >
48
+ </ section >
49
+ < section
50
+ className = "lnsFrameLayout__sidebar lnsFrameLayout__sidebar--right"
51
+ aria-labelledby = "configPanel"
52
+ >
53
+ < EuiScreenReaderOnly >
54
+ < h2 id = "configPanel" >
55
+ { i18n . translate ( 'xpack.lens.section.configPanelLabel' , {
56
+ defaultMessage : 'Config panel' ,
57
+ } ) }
58
+ </ h2 >
59
+ </ EuiScreenReaderOnly >
29
60
{ props . configPanel }
30
- </ EuiPageSideBar >
31
- </ div >
61
+ </ section >
62
+ </ EuiPageBody >
32
63
</ EuiPage >
33
64
) ;
34
65
}
0 commit comments