77import './frame_layout.scss' ;
88
99import 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' ;
1112
1213export interface FrameLayoutProps {
1314 dataPanel : React . ReactNode ;
@@ -19,16 +20,46 @@ export interface FrameLayoutProps {
1920export function FrameLayout ( props : FrameLayoutProps ) {
2021 return (
2122 < 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 >
2546 { props . workspacePanel }
2647 { 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 >
2960 { props . configPanel }
30- </ EuiPageSideBar >
31- </ div >
61+ </ section >
62+ </ EuiPageBody >
3263 </ EuiPage >
3364 ) ;
3465}
0 commit comments