@@ -74,7 +74,8 @@ export default function ChallengeViewSelector(props) {
74
74
< div styleName = "challenge-view-selector" >
75
75
< a
76
76
tabIndex = "0"
77
- role = "link"
77
+ role = "tab"
78
+ aria-selected = { selectedView === DETAIL_TABS . DETAILS }
78
79
onClick = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . DETAILS ) ; } }
79
80
onKeyPress = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . DETAILS ) ; } }
80
81
styleName = { getSelectorStyle ( selectedView , DETAIL_TABS . DETAILS ) }
@@ -85,7 +86,8 @@ DETAILS
85
86
numRegistrants ? (
86
87
< a
87
88
tabIndex = "0"
88
- role = "link"
89
+ role = "tab"
90
+ aria-selected = { selectedView === DETAIL_TABS . REGISTRANTS }
89
91
onClick = { ( e ) => {
90
92
handleSelectorClicked ( e , DETAIL_TABS . REGISTRANTS ) ;
91
93
} }
@@ -105,7 +107,8 @@ REGISTRANTS (
105
107
&& (
106
108
< a
107
109
tabIndex = "0"
108
- role = "link"
110
+ role = "tab"
111
+ aria-selected = { selectedView === DETAIL_TABS . CHECKPOINTS }
109
112
onClick = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . CHECKPOINTS ) ; } }
110
113
onKeyPress = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . CHECKPOINTS ) ; } }
111
114
styleName = { getSelectorStyle ( selectedView , DETAIL_TABS . CHECKPOINTS ) }
@@ -120,7 +123,8 @@ CHECKPOINTS (
120
123
numSubmissions ? (
121
124
< a
122
125
tabIndex = "0"
123
- role = "link"
126
+ role = "tab"
127
+ aria-selected = { selectedView === DETAIL_TABS . SUBMISSIONS }
124
128
onClick = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . SUBMISSIONS ) ; } }
125
129
onKeyPress = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . SUBMISSIONS ) ; } }
126
130
styleName = { getSelectorStyle ( selectedView , DETAIL_TABS . SUBMISSIONS ) }
@@ -135,7 +139,8 @@ SUBMISSIONS (
135
139
numWinners ? (
136
140
< a
137
141
tabIndex = "0"
138
- role = "link"
142
+ role = "tab"
143
+ aria-selected = { selectedView === DETAIL_TABS . WINNERS }
139
144
onClick = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . WINNERS ) ; } }
140
145
onKeyPress = { ( e ) => { handleSelectorClicked ( e , DETAIL_TABS . WINNERS ) ; } }
141
146
styleName = { getSelectorStyle ( selectedView , DETAIL_TABS . WINNERS ) }
0 commit comments