@@ -37,6 +37,7 @@ import { LayoutViewSizeConfig } from '@opensumi/ide-core-browser/lib/layout/cons
3737import { VIEW_CONTAINERS } from '@opensumi/ide-core-browser/lib/layout/view-id' ;
3838import { IMenuRegistry , MenuId } from '@opensumi/ide-core-browser/lib/menu/next' ;
3939import { useInjectable , useUpdateOnEventBusEvent } from '@opensumi/ide-core-browser/lib/react-hooks' ;
40+ import { formatLocalize } from '@opensumi/ide-core-common' ;
4041
4142import {
4243 IEditorGroup ,
@@ -377,7 +378,9 @@ export const Tabs = ({ group }: ITabsProps) => {
377378 return editorTabService . renderEditorTab (
378379 < >
379380 < div className = { tabsLoadingMap [ resource . uri . toString ( ) ] ? 'loading_indicator' : cls ( resource . icon ) } > </ div >
380- < div > { resource . name } </ div >
381+ < div tabIndex = { 0 } role = 'tab' aria-selected = { isCurrent ? 'true' : 'false' } >
382+ { resource . name }
383+ </ div >
381384 { subname ? < div className = { styles . subname } > { subname } </ div > : null }
382385 { decoration . readOnly ? (
383386 < span className = { cls ( getExternalIcon ( 'lock' ) , styles . editor_readonly_icon ) } > </ span >
@@ -397,7 +400,12 @@ export const Tabs = ({ group }: ITabsProps) => {
397400 } }
398401 >
399402 { editorTabService . renderTabCloseComponent (
400- < div className = { cls ( getIcon ( 'close' ) , styles_kt_editor_close_icon ) } /> ,
403+ < div
404+ className = { cls ( getIcon ( 'close' ) , styles_kt_editor_close_icon ) }
405+ tabIndex = { 0 }
406+ role = 'button'
407+ aria-label = { formatLocalize ( 'editor.closeTab.title' , resource . name ) }
408+ /> ,
401409 ) }
402410 </ div >
403411 </ div >
@@ -418,6 +426,7 @@ export const Tabs = ({ group }: ITabsProps) => {
418426 [ styles_kt_editor_tabs_current_last ] : curTabIndex === group . resources . length - 1 ,
419427 } ) }
420428 ref = { contentRef as any }
429+ role = 'tablist'
421430 >
422431 { group . resources . map ( ( resource , i ) => {
423432 let ref : HTMLDivElement | null ;
0 commit comments