Skip to content

Commit d865e0a

Browse files
committed
changes for #2822
1 parent 0adf857 commit d865e0a

File tree

1 file changed

+10
-5
lines changed
  • src/shared/components/challenge-detail/Header/TabSelector

1 file changed

+10
-5
lines changed

src/shared/components/challenge-detail/Header/TabSelector/index.jsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export default function ChallengeViewSelector(props) {
7474
<div styleName="challenge-view-selector">
7575
<a
7676
tabIndex="0"
77-
role="link"
77+
role="tab"
78+
aria-selected={selectedView === DETAIL_TABS.DETAILS}
7879
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.DETAILS); }}
7980
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.DETAILS); }}
8081
styleName={getSelectorStyle(selectedView, DETAIL_TABS.DETAILS)}
@@ -85,7 +86,8 @@ DETAILS
8586
numRegistrants ? (
8687
<a
8788
tabIndex="0"
88-
role="link"
89+
role="tab"
90+
aria-selected={selectedView === DETAIL_TABS.REGISTRANTS}
8991
onClick={(e) => {
9092
handleSelectorClicked(e, DETAIL_TABS.REGISTRANTS);
9193
}}
@@ -105,7 +107,8 @@ REGISTRANTS (
105107
&& (
106108
<a
107109
tabIndex="0"
108-
role="link"
110+
role="tab"
111+
aria-selected={selectedView === DETAIL_TABS.CHECKPOINTS}
109112
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.CHECKPOINTS); }}
110113
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.CHECKPOINTS); }}
111114
styleName={getSelectorStyle(selectedView, DETAIL_TABS.CHECKPOINTS)}
@@ -120,7 +123,8 @@ CHECKPOINTS (
120123
numSubmissions ? (
121124
<a
122125
tabIndex="0"
123-
role="link"
126+
role="tab"
127+
aria-selected={selectedView === DETAIL_TABS.SUBMISSIONS}
124128
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.SUBMISSIONS); }}
125129
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.SUBMISSIONS); }}
126130
styleName={getSelectorStyle(selectedView, DETAIL_TABS.SUBMISSIONS)}
@@ -135,7 +139,8 @@ SUBMISSIONS (
135139
numWinners ? (
136140
<a
137141
tabIndex="0"
138-
role="link"
142+
role="tab"
143+
aria-selected={selectedView === DETAIL_TABS.WINNERS}
139144
onClick={(e) => { handleSelectorClicked(e, DETAIL_TABS.WINNERS); }}
140145
onKeyPress={(e) => { handleSelectorClicked(e, DETAIL_TABS.WINNERS); }}
141146
styleName={getSelectorStyle(selectedView, DETAIL_TABS.WINNERS)}

0 commit comments

Comments
 (0)