Skip to content

Commit 73f40e6

Browse files
committed
Achievements
1 parent 0bd147e commit 73f40e6

13 files changed

Lines changed: 133 additions & 23 deletions

account/achievements.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>Achievements</h1>
2424
<div class="container account-panel">
2525
<aside class="side-menu" aria-label="Account pages">
2626
<a href="index.html">Account Home</a>
27-
<a href="profile.html">Profile</a>
27+
<a class="active" href="achievements.html">Achievements</a>
2828
<a href="preferences.html">Preferences</a>
29+
<a href="profile.html">Profile</a>
2930
<a href="security.html">Security</a>
30-
<a class="active" href="achievements.html">Achievements</a>
3131
</aside>
3232
<div class="content-stack">
3333
<div class="card">
@@ -36,14 +36,14 @@ <h1>Achievements</h1>
3636
<h2>Build, Play and Share progress</h2>
3737
<p class="lede">Use the account achievements modes to review game creation, play activity and share reach without adding live account behavior.</p>
3838
<div class="hero-actions" aria-label="Achievement views">
39-
<button class="btn primary" type="button" data-achievements-tab="build" aria-pressed="true">Build</button>
40-
<button class="btn" type="button" data-achievements-tab="play" aria-pressed="false">Play</button>
41-
<button class="btn" type="button" data-achievements-tab="share" aria-pressed="false">Share</button>
39+
<button class="btn primary" type="button" data-achievements-tab="build" aria-controls="build-achievements-panel" aria-pressed="true">Build</button>
40+
<button class="btn" type="button" data-achievements-tab="play" aria-controls="play-achievements-panel" aria-pressed="false">Play</button>
41+
<button class="btn" type="button" data-achievements-tab="share" aria-controls="share-achievements-panel" aria-pressed="false">Share</button>
4242
</div>
4343
</div>
4444
</div>
4545

46-
<section data-achievements-panel="build" aria-labelledby="build-achievements-title">
46+
<section id="build-achievements-panel" data-achievements-panel="build" aria-labelledby="build-achievements-title" aria-hidden="false">
4747
<div class="content-stack">
4848
<div class="grid cols-4" aria-label="Build stats">
4949
<article class="mini-stat"><strong>12</strong>Created games</article>
@@ -100,7 +100,7 @@ <h2 id="build-achievements-title">Created games</h2>
100100
</div>
101101
</section>
102102

103-
<section data-achievements-panel="play" aria-labelledby="play-achievements-title" hidden>
103+
<section id="play-achievements-panel" data-achievements-panel="play" aria-labelledby="play-achievements-title" aria-hidden="true" hidden>
104104
<div class="content-stack">
105105
<div class="grid cols-4" aria-label="Play stats">
106106
<article class="mini-stat"><strong>36</strong>Played games</article>
@@ -153,7 +153,7 @@ <h2 id="play-achievements-title">Played games</h2>
153153
</div>
154154
</section>
155155

156-
<section data-achievements-panel="share" aria-labelledby="share-achievements-title" hidden>
156+
<section id="share-achievements-panel" data-achievements-panel="share" aria-labelledby="share-achievements-title" aria-hidden="true" hidden>
157157
<div class="content-stack">
158158
<div class="grid cols-4" aria-label="Share analytics">
159159
<article class="mini-stat"><strong>9.4K</strong>Share views</article>

account/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>Account Home</h1>
2424
<div class="container account-panel">
2525
<aside class="side-menu" aria-label="Account pages">
2626
<a class="active" href="index.html">Account Home</a>
27-
<a href="profile.html">Profile</a>
27+
<a href="achievements.html">Achievements</a>
2828
<a href="preferences.html">Preferences</a>
29+
<a href="profile.html">Profile</a>
2930
<a href="security.html">Security</a>
30-
<a href="achievements.html">Achievements</a>
3131
</aside>
3232
<div class="card">
3333
<div class="card-body">

account/preferences.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>Preferences</h1>
2424
<div class="container account-panel">
2525
<aside class="side-menu" aria-label="Account pages">
2626
<a href="index.html">Account Home</a>
27-
<a href="profile.html">Profile</a>
27+
<a href="achievements.html">Achievements</a>
2828
<a class="active" href="preferences.html">Preferences</a>
29+
<a href="profile.html">Profile</a>
2930
<a href="security.html">Security</a>
30-
<a href="achievements.html">Achievements</a>
3131
</aside>
3232
<div class="card">
3333
<div class="card-body">

account/profile.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>Profile</h1>
2424
<div class="container account-panel">
2525
<aside class="side-menu" aria-label="Account pages">
2626
<a href="index.html">Account Home</a>
27-
<a class="active" href="profile.html">Profile</a>
27+
<a href="achievements.html">Achievements</a>
2828
<a href="preferences.html">Preferences</a>
29+
<a class="active" href="profile.html">Profile</a>
2930
<a href="security.html">Security</a>
30-
<a href="achievements.html">Achievements</a>
3131
</aside>
3232
<div class="card">
3333
<div class="card-body">

account/security.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>Security</h1>
2424
<div class="container account-panel">
2525
<aside class="side-menu" aria-label="Account pages">
2626
<a href="index.html">Account Home</a>
27-
<a href="profile.html">Profile</a>
27+
<a href="achievements.html">Achievements</a>
2828
<a href="preferences.html">Preferences</a>
29+
<a href="profile.html">Profile</a>
2930
<a class="active" href="security.html">Security</a>
30-
<a href="achievements.html">Achievements</a>
3131
</aside>
3232
<div class="card">
3333
<div class="card-body">

assets/theme-v2/js/account-achievements.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
});
1414

1515
panels.forEach((panel) => {
16-
panel.hidden = panel.dataset.achievementsPanel !== tabName;
16+
const isActive = panel.dataset.achievementsPanel === tabName;
17+
panel.hidden = !isActive;
18+
panel.setAttribute("aria-hidden", String(!isActive));
1719
});
1820
}
1921

assets/theme-v2/partials/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ <h2 id="footer-docs-help">Docs &amp; Help</h2>
3030
<h2 id="footer-account">Account</h2>
3131
<div class="footer__links">
3232
<a data-route="account" href="account/index.html">Account Home</a>
33-
<a data-route="account-profile" href="account/profile.html">Profile</a>
33+
<a data-route="account-achievements" href="account/achievements.html">Achievements</a>
3434
<a data-route="account-preferences" href="account/preferences.html">Preferences</a>
35+
<a data-route="account-profile" href="account/profile.html">Profile</a>
3536
<a data-route="account-security" href="account/security.html">Security</a>
36-
<a data-route="account-achievements" href="account/achievements.html">Achievements</a>
3737
</div>
3838
</section>
3939
<section class="footer__group footer__legal" aria-labelledby="footer-legal">

assets/theme-v2/partials/header-nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@
8080
<a data-nav-link data-route="account" href="account/index.html">Account &#9662;</a>
8181
<div class="sub-menu">
8282
<a data-nav-link data-route="account" href="account/index.html">Account Home</a>
83-
<a data-nav-link data-route="account-profile" href="account/profile.html">Profile</a>
83+
<a data-nav-link data-route="account-achievements" href="account/achievements.html">Achievements</a>
8484
<a data-nav-link data-route="account-preferences" href="account/preferences.html">Preferences</a>
85+
<a data-nav-link data-route="account-profile" href="account/profile.html">Profile</a>
8586
<a data-nav-link data-route="account-security" href="account/security.html">Security</a>
86-
<a data-nav-link data-route="account-achievements" href="account/achievements.html">Achievements</a>
8787
</div>
8888
</div>
8989
</nav>

docs_build/dev/codex_commands.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,34 @@ Required reports:
168168
- `docs_build/dev/reports/codex_changed_files.txt`
169169
- `docs_build/dev/reports/codex_review.diff`
170170
- `docs_build/dev/reports/account_achievements_wireframe_report.md`
171+
172+
## PR_26155_003
173+
174+
Changes:
175+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
176+
- Kept `account/achievements.html` defaulted to the Build view.
177+
- Made the Build default show only Build / Created games content.
178+
- Kept Played games and shared content hidden until their matching buttons are selected.
179+
- Added explicit `aria-controls`, panel IDs, and `aria-hidden` state for Achievements tabs and panels.
180+
- Updated external tab switching in `assets/theme-v2/js/account-achievements.js` to keep `hidden` and `aria-hidden` synchronized.
181+
- Sorted the short Account sidebar alphabetically across account pages.
182+
- Updated targeted Achievements Playwright coverage for the default visible content, selected content switching, and sidebar order.
183+
- No CSS added or modified.
184+
185+
Validation:
186+
- `node --check assets/theme-v2/js/account-achievements.js`.
187+
- `node --check tests/playwright/account/AchievementsPage.spec.mjs`.
188+
- Static validation for inline script/style/event handlers.
189+
- `npx playwright test tests/playwright/account/AchievementsPage.spec.mjs --project=playwright --workers=1 --reporter=list`.
190+
- `git diff --check`.
191+
- Full samples smoke test skipped because samples are not in scope.
192+
193+
Required reports:
194+
- `docs_build/dev/reports/codex_changed_files.txt`
195+
- `docs_build/dev/reports/codex_review.diff`
196+
- `docs_build/dev/reports/account_achievements_tab_sidebar_fix_report.md`
197+
198+
Follow-up:
199+
- Sorted shared header and footer Account menus to match the Account sidebar order:
200+
Account Home, Achievements, Preferences, Profile, Security.
201+
- Extended targeted Achievements Playwright coverage to verify header and footer Account menu order.

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add account achievements wireframe with Build Play Share tabs - PR_26155_002-account-achievements-wireframe
1+
Fix account achievements tab visibility and sidebar sorting - PR_26155_003-account-achievements-tab-sidebar-fix

0 commit comments

Comments
 (0)