@@ -75,17 +75,25 @@ const handleRepack = (selectedFiles: FileInfo[]) => {
7575 />
7676 <div v-else-if =" result" class =" result-content" >
7777 <!-- Tab Navigation -->
78- <div v-if =" hasFileSelection" class =" tab-navigation" >
79- <button
78+ <div v-if =" hasFileSelection" class =" tab-navigation" role =" tablist" aria-label =" Pack result view" >
79+ <button
80+ id =" tab-result"
8081 type =" button"
82+ role =" tab"
83+ aria-controls =" tabpanel-result"
84+ :aria-selected =" activeTab === 'result'"
8185 class =" tab-button"
8286 :class =" { active: activeTab === 'result' }"
8387 @click =" handleTabClick('result')"
8488 >
8589 Result
8690 </button >
87- <button
91+ <button
92+ id =" tab-files"
8893 type =" button"
94+ role =" tab"
95+ aria-controls =" tabpanel-files"
96+ :aria-selected =" activeTab === 'files'"
8997 class =" tab-button"
9098 :class =" { active: activeTab === 'files' }"
9199 @click =" handleTabClick('files')"
@@ -95,10 +103,20 @@ const handleRepack = (selectedFiles: FileInfo[]) => {
95103 </div >
96104
97105 <!-- Tab Content -->
98- <div v-show =" activeTab === 'result' || !hasFileSelection" >
106+ <div
107+ id =" tabpanel-result"
108+ role =" tabpanel"
109+ aria-labelledby =" tab-result"
110+ v-show =" activeTab === 'result' || !hasFileSelection"
111+ >
99112 <TryItResultContent :result =" result " :pack-options =" packOptions " />
100113 </div >
101- <div v-show =" activeTab === 'files' && hasFileSelection" >
114+ <div
115+ id =" tabpanel-files"
116+ role =" tabpanel"
117+ aria-labelledby =" tab-files"
118+ v-show =" activeTab === 'files' && hasFileSelection"
119+ >
102120 <TryItFileSelection
103121 v-if =" hasFileSelection "
104122 :all-files =" result .metadata ! .allFiles ! "
@@ -147,6 +165,11 @@ const handleRepack = (selectedFiles: FileInfo[]) => {
147165 color : var (--vp-c-text-1 );
148166}
149167
168+ .tab-button :focus-visible {
169+ outline : 2px solid var (--vp-c-brand-1 );
170+ outline-offset : -2px ;
171+ }
172+
150173.tab-button.active {
151174 color : var (--vp-c-brand-1 );
152175 border-bottom-color : var (--vp-c-brand-1 );
0 commit comments