Skip to content

test(accessibility): verify Heatmap screen reader support#3661

Open
saagnik23 wants to merge 2 commits into
JhaSourav07:mainfrom
saagnik23:test/heatmap-accessibility
Open

test(accessibility): verify Heatmap screen reader support#3661
saagnik23 wants to merge 2 commits into
JhaSourav07:mainfrom
saagnik23:test/heatmap-accessibility

Conversation

@saagnik23
Copy link
Copy Markdown
Contributor

Description

Fixes #2556

Adds comprehensive accessibility and screen reader ARIA compliance tests for the dashboard Heatmap component.

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (Testing only)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., test(accessibility): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

Copilot AI review requested due to automatic review settings June 4, 2026 09:24
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 4, 2026

@saagnik23 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an accessibility-focused test suite for the Heatmap dashboard component to validate semantic structure and keyboard/ARIA behavior.

Changes:

  • Introduces Vitest + Testing Library tests covering headings, grid/row/gridcell semantics, and focus/tooltip interactions
  • Adds test helpers/mocks (e.g., ResizeObserver, framer-motion) to support JSDOM execution
  • Verifies empty-state fallback behavior when contribution data is absent/zeroed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +17
beforeAll(() => {
global.ResizeObserver = class ResizeObserver {
observe() {}
unobserve() {}
disconnect() {}
};
});
Comment on lines +20 to +36
/* eslint-disable @typescript-eslint/no-unused-vars */
vi.mock('framer-motion', () => ({
motion: {
div: ({
children,
initial,
whileInView,
viewport,
transition,
animate,
exit,
...props
}: Record<string, unknown>) => <div {...props}>{children}</div>,
},
AnimatePresence: ({ children }: { children?: ReactNode }) => <>{children}</>,
}));
/* eslint-enable @typescript-eslint/no-unused-vars */
Comment on lines +85 to +87
cells.forEach((cell) => {
expect(cell).toHaveAttribute('tabIndex', '0');
});
Comment on lines +101 to +107
expect(cells[0]).toHaveAttribute('aria-label', '0 contributions on Jan 1, 2024');

// Day 2: 1 contribution
expect(cells[1]).toHaveAttribute('aria-label', '1 contribution on Jan 2, 2024');

// Day 3: 5 contributions
expect(cells[2]).toHaveAttribute('aria-label', '5 contributions on Jan 3, 2024');
// Tooltip should appear
const tooltip = screen.getByRole('tooltip');
expect(tooltip).toBeInTheDocument();
expect(tooltip).toHaveTextContent('3 contributions on Jan 1, 2024');
@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🚨 Hey @saagnik23, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the code side! The accessibility tests are very well done. Note that CI seems to be failing, please resolve that if needed.

@Aamod007 Aamod007 added level:intermediate Moderate complexity tasks GSSoC 2026 mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:testing Adding, updating, or fixing tests labels Jun 4, 2026
Copy link
Copy Markdown
Collaborator

@Aamod007 Aamod007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Code looks good, but CI is failing. Please fix the CI issues so this can be merged.

@Aamod007 Aamod007 self-requested a review June 4, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC 2026 level:intermediate Moderate complexity tasks mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. status:blocked This PR is blocked due to a failing CI check. type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(Heatmap-accessibility): verify Accessibility Standards & Screen Reader Aria Compliance (Variation 4)

3 participants