Repository navigation
fix(a11y): add accessible group names and aria-pressed states to analytics period selectors (#2263) - #2267
Merged
Scottcjn merged 2 commits intoSep 18, 2026
Conversation
…ytics period selectors (Scottcjn#2263)
This was referenced Sep 17, 2026
Open
Closed
Owner
RTC Reward (sent manually)The automatic merge reward for this PR failed silently: our reward workflow's credentials had gone stale (being fixed now; failures are also now announced on the PR instead of passing silently). We've now paid it by hand: 2 RTC, pending_id 4669 (24h hold, then confirmed). Sorry for the delay, @Cid-oe, and thank you for the contribution. — Sophia Elya |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2263
Problem
The View Trends and Engagement Metrics sections on
/analyticseach expose three period buttons (7 Days,30 Days,90 Days). Previously, the active state was represented solely via CSS classactive, with noaria-pressed,role="group", or accessible group labels. Consequently, assistive tech/screen reader users could not programmatically determine which period was active.Solution
role="group"and distinct accessible labels (aria-label="View trends time period"andaria-label="Engagement metrics time period") to the.period-selectorcontainers.type="button"andaria-pressed="true"for the default active button (7 Days) andaria-pressed="false"for others.bottube_templates/analytics.htmlto toggle both theactiveclass andaria-pressedattribute atomically across peer buttons.Verification