Skip to content

feat: add keyboard shortcuts for search focus and section navigation#1992

Open
GeethaBurigalla wants to merge 7 commits into
S3DFX-CYBER:mainfrom
GeethaBurigalla:feat/keyboard-shortcuts-1989
Open

feat: add keyboard shortcuts for search focus and section navigation#1992
GeethaBurigalla wants to merge 7 commits into
S3DFX-CYBER:mainfrom
GeethaBurigalla:feat/keyboard-shortcuts-1989

Conversation

@GeethaBurigalla

@GeethaBurigalla GeethaBurigalla commented Jul 4, 2026

Copy link
Copy Markdown

📝 Description

Adds working keyboard shortcuts for search focus and section navigation. / previously pointed at a hidden input and did nothing in production — this fixes that and adds ⌘K/Ctrl+K as an alternate way to focus the search bar, plus Alt+1 and Alt+2 to jump to the Timeline and Organizations sections (chosen over Ctrl/Cmd+1/2 since those are reserved by browsers for tab-switching). Also adds role="dialog" and aria-modal to the help modal for accessibility, documents the new shortcuts in the help table, and adds a visible ⌘K hint chip on the search bar.

🔗 Related Issue

Closes #1989

🚀 Program Classification

  • GSSoC26
  • NSoC26
  • General Contribution

🔄 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔍 SEO improvement
  • 🎨 Style / UI improvement
  • ♿ Accessibility improvement
  • 📝 Documentation
  • ⚙️ CI / configuration
  • 🧹 Refactor / cleanup

🧪 How to Test

  1. Open index.html in a browser
  2. Press / or ⌘K (Ctrl+K on Windows/Linux) — the search bar should be focused
  3. Press Alt+1 — the page should smoothly scroll to the Timeline section
  4. Press Alt+2 — the page should smoothly scroll to the Organizations section
  5. Press ? — the help modal should open, showing the updated shortcuts list
  6. Inspect the help modal element — it should have role="dialog" and aria-modal="true"
  7. Ran npm run lint:js, npm run lint:html, and npm test locally — all pass (25/25 tests)

📸 Screenshots (if applicable)

Not applicable — behavioral/keyboard change, no visual redesign.

✅ Checklist

  • My code follows the project's existing style
  • I have tested my changes in a browser
  • I have linked the related issue above
  • My PR title follows Conventional Commits format (e.g. feat: add scroll button)
  • I have not introduced any new dependencies or build tools

Review in cubic

Signed-off-by: Geetha <25wh5a0505@bvrithyderabad.edu.in>
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

@GeethaBurigalla is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added enhancement New feature or request frontend gssoc26 GirlScript Summer of Code 2026 labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Dual Program Label Detected

Hi @GeethaBurigalla,

Your PR description mentions both GSSOC and NSOC.

Detected Labels Resolution
gssoc, nsoc GSSoC priority applied — classified as a GSSoC PR

ℹ️ Only one program label may be active at a time. GSSoC takes priority when both are present.

If this is incorrect, please:

  1. Remove the unintended program keyword from your PR description
  2. Push a new commit or re-open the PR to re-trigger classification

📖 See our Contributing Guide for labeling details.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

💬 Faster Reviews & Assignments

Hi @GeethaBurigalla, for faster coordination and smoother communication, consider joining our Discord community:

👉 https://discord.gg/MmZGG2ee

Useful Channels

  • #issue-links-for-assignment → Share issue links for assignment help
  • #pr-links-for-review → Share PR links for mentor/maintainer review

Please avoid spamming channels or repeatedly pinging mentors/maintainers.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

✅ PR Validation Passed

Hi @GeethaBurigalla, automated PR validation checks passed.

Your PR is ready for review.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for opening a PR, @GeethaBurigalla!

Your PR has entered the 🚦 PR Review Pipeline.

🟢 GSSOC PR detected — your PR will be routed through the GSSOC mentor review pipeline.

⚠️ Dual-label notice: Both GSSOC and NSOC signals were detected in your PR. GSSoC takes priority and your PR has been classified as a GSSoC PR only. If this is incorrect, please remove the unintended program keyword from your PR description and push a new commit.


🔄 Review Flow

Stage Reviewer Purpose
Stage 1 🤖 Automation Validation · Duplicate Detection · AI/Slop Checks · Formatting · PR Analysis
Stage 2 🧑‍🏫 GSSOC Mentor Code Review · Scope Validation · Quality Check
Stage 3 🔑 Project Admin / Maintainer Final Approval & Merge Decision

The automated PR analysis system will verify issue linkage, PR relevance, and contribution quality.

A pipeline status comment may appear automatically as your PR progresses.


✅ Contributor Checklist

  • Sign commits using git commit -s
  • Link a valid issue (Closes #123)
  • Keep changes focused and relevant
  • Do not include unrelated modifications
  • Ensure workflows/build/tests are passing
  • Read the appropriate contributor guide:

⚠️ Important Notes

  • Low-quality, spammy, or AI-generated PRs may be closed
  • PRs without linked issues may fail automated checks
  • Large unrelated PRs are likely to be rejected
  • Review times may vary depending on mentor/reviewer availability

Happy contributing 🚀

This message is posted automatically and only once.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

✅ DCO Sign-off Verified

Hi @GeethaBurigalla 👋

All commits in this PR contain valid Signed-off-by lines.

Thank you for following the DCO requirements 🚀

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a small-screen shortcut hint for quickly focusing search.
    • Added keyboard shortcuts to jump directly to the Timeline and Organizations sections.
  • Bug Fixes

    • Improved modal accessibility with proper dialog semantics and title labeling.
    • Added focus trapping and restore behavior when opening and closing the help modal.
    • Prevented global shortcuts from firing while dialogs are open, reducing accidental interactions.

Walkthrough

This PR adds keyboard shortcut hints, updates the help modal accessibility and shortcut reference, and changes modal focus handling and global keyboard shortcut routing.

Changes

Keyboard shortcuts and help modal

Layer / File(s) Summary
Search hint and help modal markup
index.html
Adds the hero search shortcut hint, sets dialog semantics on the help modal, gives the modal title an id, and updates the shortcut table entries for search and section jumps.
Help modal focus handling
index.html
Stores the previously focused element on open, focuses the close button, traps Tab navigation inside the modal, and restores focus on close.
Global shortcut routing
index.html, src/js/app.js
Expands escape-key modal detection, computes typing and modal state before handling shortcuts, focuses the hero search field for / and Ctrl/⌘+K, and scrolls to Timeline or Organizations for Alt+1 and Alt+2.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: type:feature, level:intermediate

Suggested reviewers: KumarNirupam1, S3DFX-CYBER

Poem

Hoppity, hop—my whiskers cheer,
New shortcuts whisk the search right near.
The modal traps my taps with grace,
And jumps to sections set the pace.
Bunny-approved! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR covers search focus, section jumps, and help modal accessibility, but not result navigation, Enter, Esc clear/close, or visible focus rings from #1989. Implement the remaining keyboard behaviors from #1989: arrow-key result navigation, Enter selection, Esc clear/close, and visible focus rings.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: new keyboard shortcuts for search and section navigation.
Description check ✅ Passed The description matches the template well and fills the required sections with specific testing and checklist details.
Out of Scope Changes check ✅ Passed The added modal accessibility and shortcut hint work stays within the issue's keyboard-navigation and accessibility scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/js/app.js

Parsing error: Identifier 'anyModalOpen' has already been declared


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added gssoc26 GirlScript Summer of Code 2026 stage-1-approved needs-mentor-review mentor-review-requested and removed gssoc26 GirlScript Summer of Code 2026 labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🚦 PR Review Pipeline

🟢 GSSOC PR

Stage Status
Stage 1 — Automated Checks ✅ All automated checks passed
Stage 2 — Mentor/Reviewer ⏳ Awaiting GSSOC mentor review
Stage 3 — Maintainer 🔒 Blocked until Stage 2 passes

No active issues


Last updated: Sat, 04 Jul 2026 12:01:30 GMT

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🤖 TENET Agent Review

📋 Summary

This PR introduces new keyboard shortcuts to enhance navigation and search functionality. Users can now focus the search bar using / or ⌘K/Ctrl+K, and quickly jump to the Timeline and Organizations sections with ⌘1/Ctrl+1 and ⌘2/Ctrl+2 respectively. Additionally, the help modal has received accessibility improvements with ARIA attributes, and the new shortcuts are documented within it.

🔐 Security Findings

No security issues found.

🧹 Code Quality

  • index.html and src/js/app.js - Redundant Event Listeners: The document.addEventListener('keydown') block in index.html duplicates the global keydown handling logic already present in src/js/app.js within handleGlobalKeydown. This leads to redundant code, potential for conflicting behavior, and increased maintenance burden. The logic should be consolidated into src/js/app.js.
  • index.html - Inline Script Complexity: Adding significant new logic to the large inline <script> block at the end of index.html increases its complexity and deviates from the principle of separating concerns. This logic, especially global event listeners, would be better placed in src/js/app.js.
  • index.html - isTyping Check Inconsistency: The isTyping check in the index.html script includes active.id === 'searchInput', which is not present in the HTML and differs slightly from the src/js/app.js version. While hero-search is an input, this specific check is unnecessary and highlights the duplication issue.

✅ What's Done Well

  • Accessibility Improvements: The addition of role="dialog", aria-modal="true", and aria-labelledby to the help modal significantly improves its accessibility for screen reader users.
  • Clear Shortcut Documentation: The help modal is updated to clearly document all new keyboard shortcuts, ensuring users can discover and utilize these features.
  • Robust Shortcut Handling: The implementation correctly uses e.preventDefault() and includes an isTyping check to prevent shortcuts from firing when the user is actively typing in an input field, enhancing the user experience.

📝 Overall Verdict

REQUEST CHANGES - Consolidate keydown event listeners and move complex logic from inline script to src/js/app.js to improve code maintainability and prevent conflicts.


Review powered by TENET Agent 🛡️ | Triggered automatically on PR #1992

@coderabbitai
coderabbitai Bot requested a review from KumarNirupam1 July 4, 2026 12:01
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds keyboard shortcuts and improves the shortcuts help modal.

  • / and Cmd/Ctrl+K focus the search bar.
  • Alt+1 and Alt+2 jump to page sections.
  • The shortcuts modal gets dialog metadata and focus handling.
  • The help table and search hint show the new shortcuts.

Confidence Score: 2/5

This should be fixed before merging.

  • src/js/app.js can fail to load because of duplicate const declarations.
  • The inline modal guard still misses some modal overlays, so page shortcuts can run behind them.

src/js/app.js and index.html

Important Files Changed

Filename Overview
src/js/app.js Adds modal-aware shortcut handling, but the changed block contains duplicate lexical declarations that can stop the script from loading.
index.html Adds shortcut UI, help modal accessibility updates, and inline shortcut guards, but the guard does not cover every modal overlay.

Reviews (7): Last reviewed commit: "fix: block page shortcuts behind any ope..." | Re-trigger Greptile

Comment thread index.html Outdated
Comment thread index.html
Comment thread index.html Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/js/app.js (1)

716-741: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep modifier shortcuts outside the typing guard. The input-focus return also blocks ⌘K, ⌘1, and ⌘2, so these shortcuts stop working whenever the search field or another form control has focus. Let meta/ctrl combos bypass this check (and mirror the same change in the duplicate keydown listener in index.html if it stays).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/js/app.js` around lines 716 - 741, The typing guard in
handleGlobalKeydown is preventing modifier shortcuts from firing when focus is
inside an INPUT, SELECT, or TEXTAREA. Move the meta/ctrl shortcut handling for
hero-search focus and timeline/org scrolling ahead of that early return, or
exempt those combinations from the guard, and apply the same adjustment in the
duplicate keydown listener in index.html if it remains.
🧹 Nitpick comments (1)
index.html (1)

5203-5213: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Consider native <dialog> element (optional).

SonarCloud flags role="dialog" in favor of the native <dialog> element for stronger built-in accessibility (focus trapping, Escape handling, etc.). Current markup with role, aria-modal, and aria-labelledby is an acceptable ARIA pattern, but migrating to <dialog> would also address the issue's requirement for a keyboard focus trap, which does not appear implemented here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@index.html` around lines 5203 - 5213, The help modal markup currently uses a
generic div with ARIA dialog attributes, but it does not implement the keyboard
focus trap that the review comment calls out. Update the modal in the help modal
markup and related open/close handlers around closeHelpModal() to either migrate
to the native dialog element or add explicit focus management, keyboard
trapping, and Escape handling so keyboard focus stays within the modal while it
is open.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@index.html`:
- Around line 5354-5364: The keyboard shortcut handler for the timeline and
organizations jumps uses reserved browser tab-switch bindings, so the page won’t
reliably receive them. Update the key handling in the shortcut listener that
checks `isTyping`, `e.metaKey`/`e.ctrlKey`, and `e.key` for the timeline/orgs
scroll actions to use a non-reserved shortcut instead, such as `Alt+1`/`Alt+2`
or another multi-key chord, while keeping the existing `scrollIntoView` behavior
and `preventDefault` calls.
- Around line 5341-5369: The global keydown shortcut logic is duplicated here
and in handleGlobalKeydown, so keep the shortcut handling in one place and
remove this inline copy. Update the typing guard to match the current search
field id used by the page (`#hero-search`) instead of checking searchInput. Use
the existing handleGlobalKeydown function as the single source of truth for
shortcuts and typing-state checks.

---

Outside diff comments:
In `@src/js/app.js`:
- Around line 716-741: The typing guard in handleGlobalKeydown is preventing
modifier shortcuts from firing when focus is inside an INPUT, SELECT, or
TEXTAREA. Move the meta/ctrl shortcut handling for hero-search focus and
timeline/org scrolling ahead of that early return, or exempt those combinations
from the guard, and apply the same adjustment in the duplicate keydown listener
in index.html if it remains.

---

Nitpick comments:
In `@index.html`:
- Around line 5203-5213: The help modal markup currently uses a generic div with
ARIA dialog attributes, but it does not implement the keyboard focus trap that
the review comment calls out. Update the modal in the help modal markup and
related open/close handlers around closeHelpModal() to either migrate to the
native dialog element or add explicit focus management, keyboard trapping, and
Escape handling so keyboard focus stays within the modal while it is open.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3eb43b18-f142-4eab-87d9-1c5d93ae7406

📥 Commits

Reviewing files that changed from the base of the PR and between f622488 and 950c3bb.

📒 Files selected for processing (2)
  • index.html
  • src/js/app.js
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Greptile Review
⚠️ CI failures not shown inline (1)

Commit Status: Vercel: Vercel

Conclusion: failure

Authorization required to deploy.
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-06-15T18:15:28.688Z
Learnt from: arghya29
Repo: S3DFX-CYBER/GSoC-Org-Finder- PR: 1882
File: src/js/footer.js:33-33
Timestamp: 2026-06-15T18:15:28.688Z
Learning: In this repo’s JavaScript (e.g., footer.js), `globalThis` is intentionally preferred over `window` to keep code environment-agnostic and to satisfy SonarCloud static analysis. The project targets modern browsers (ES2021) with no transpilation, so `globalThis` is fully supported—do not flag `globalThis` usage as a browser compatibility concern or suggest replacing it with `window` during review.

Applied to files:

  • src/js/app.js
🪛 ast-grep (0.44.0)
index.html

[warning] 5341-5344: Avoid SQL injections
Context: active && (
['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
)
Note: [CWE-89] Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Security best practice.

(variable-sql-statement-injection)


[warning] 5342-5343: Avoid SQL injections
Context: ['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
Note: [CWE-89] Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Security best practice.

(variable-sql-statement-injection)

🪛 GitHub Check: SonarCloud Code Analysis
index.html

[warning] 5203-5203: Use instead of the dialog role to ensure accessibility across all devices.

See more on https://sonarcloud.io/project/issues?id=S3DFX-CYBER_GSoC-Org-Finder-&issues=AZ8tAayo_PZEko8307io&open=AZ8tAayo_PZEko8307io&pullRequest=1992

🔇 Additional comments (3)
index.html (2)

1358-1359: LGTM!


5248-5262: LGTM!

src/js/app.js (1)

732-741: LGTM!

Comment thread index.html
Comment on lines +5341 to +5369
const active = document.activeElement;
const isTyping = active && (
['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
);

// Focus search bar — works alongside Ctrl/Cmd but not while already typing
if (!isTyping && (e.key === '/' || ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k'))) {
e.preventDefault();
document.getElementById('hero-search')?.focus();
return;
}
// Jump to Timeline section
if (!isTyping && (e.metaKey || e.ctrlKey) && e.key === '1') {
e.preventDefault();
document.getElementById('timeline')?.scrollIntoView({ behavior: 'smooth', block: 'start' });
return;
}
// Jump to Organizations section
if (!isTyping && (e.metaKey || e.ctrlKey) && e.key === '2') {
e.preventDefault();
document.getElementById('orgs')?.scrollIntoView({ behavior: 'smooth', block: 'start' });
return;
}

if (e.ctrlKey || e.metaKey || e.altKey) {
return;
}
const active = document.activeElement;
if (
active &&
(
['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
)
) {
if (isTyping) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for duplicate keydown listeners across index.html and app.js
rg -n "addEventListener\('keydown'|onkeydown" index.html src/js/app.js

Repository: S3DFX-CYBER/GSoC-Org-Finder-

Length of output: 1193


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the global keydown handler and the inline handler around the relevant lines.
sed -n '720,750p' src/js/app.js
printf '\n--- index.html ---\n'
sed -n '5338,5375p' index.html

Repository: S3DFX-CYBER/GSoC-Org-Finder-

Length of output: 2207


Consolidate the global keydown shortcut handler

This inline document.addEventListener('keydown', …) duplicates src/js/app.js#handleGlobalKeydown, and its isTyping guard still checks active.id === 'searchInput' while the search field is now #hero-search. Keep the shortcut logic in one place to avoid divergence.

🧰 Tools
🪛 ast-grep (0.44.0)

[warning] 5341-5344: Avoid SQL injections
Context: active && (
['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
)
Note: [CWE-89] Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Security best practice.

(variable-sql-statement-injection)


[warning] 5342-5343: Avoid SQL injections
Context: ['INPUT', 'TEXTAREA', 'SELECT'].includes(active.tagName) ||
active.id === 'searchInput'
Note: [CWE-89] Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'). Security best practice.

(variable-sql-statement-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@index.html` around lines 5341 - 5369, The global keydown shortcut logic is
duplicated here and in handleGlobalKeydown, so keep the shortcut handling in one
place and remove this inline copy. Update the typing guard to match the current
search field id used by the page (`#hero-search`) instead of checking searchInput.
Use the existing handleGlobalKeydown function as the single source of truth for
shortcuts and typing-state checks.

Comment thread index.html Outdated
@github-project-automation github-project-automation Bot moved this from Todo to In progress in GSSOC 26 Jul 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

4 issues found across 2 files

Confidence score: 2/5

  • In index.html, the global keydown shortcuts run before the modal-open check and the dialog is marked aria-modal="true"/role="dialog" without a focus trap, so keyboard users can still move focus/scroll the page behind the modal and break expected dialog behavior. Reorder the shortcut guard to exit early when a modal is open and add focus-trap + focus-return logic before merging.
  • In src/js/app.js, binding Cmd/Ctrl+1 and Cmd/Ctrl+2 for section navigation conflicts with browser tab-switch shortcuts, which can prevent handlers from firing or create inconsistent behavior across browsers. Replace these with non-reserved combos (or make them configurable) and verify in Chrome/Firefox before merging.
  • In index.html, the shortcut hints show only while the implementation accepts both metaKey and ctrlKey, which can mislead Windows/Linux users and reduce discoverability of the new shortcuts. Update visible shortcut copy/help-table to include platform-appropriate keys before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="index.html">

<violation number="1" location="index.html:1359">
P2: The visible search-bar hint chip and help-modal shortcut table only show Mac-specific `⌘` symbols, but the handler code accepts both `Ctrl` and `Cmd` (`e.metaKey || e.ctrlKey`). On Windows/Linux, users won't see that `Ctrl+K`, `Ctrl+1`, and `Ctrl+2` also work, which undermines the discoverability this PR aims to improve. Consider displaying both alternatives (e.g., `Ctrl/Cmd+K`) or adapting the label to the user's platform.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant User as User (Keyboard)
    participant Doc as document (keydown listener)
    participant Search as Search Input (#hero-search)
    participant Timeline as Timeline section (#timeline)
    participant Orgs as Organizations section (#orgs)
    participant Modal as Help Modal (#helpModal)

    Note over User,Modal: Keyboard Shortcut Handling Flow

    User->>Doc: Presses key

    alt Key is '/' or (Cmd/Ctrl + K)
        Note over Doc: NEW: Handles focus search shortcut
        Doc->>Doc: Check if typing in input field
        alt Not typing
            Doc->>Search: focus()
            Search-->>User: Search bar focused
        end
    else Key is Cmd/Ctrl + 1
        Note over Doc: NEW: Jump to Timeline
        Doc->>Doc: Check if typing in input field
        alt Not typing
            Doc->>Timeline: scrollIntoView({behavior: 'smooth'})
            Timeline-->>User: Scrolled to Timeline
        end
    else Key is Cmd/Ctrl + 2
        Note over Doc: NEW: Jump to Organizations
        Doc->>Doc: Check if typing in input field
        alt Not typing
            Doc->>Orgs: scrollIntoView({behavior: 'smooth'})
            Orgs-->>User: Scrolled to Organizations
        end
    else Key is '?'
        Note over Doc: Existing help modal toggle
        Doc->>Modal: Toggle modal with role="dialog"
        Modal-->>User: Modal displayed
    end

    Note over Search: CHANGED: Now shows ⌘K hint chip
    Note over Modal: CHANGED: Added role="dialog" aria-modal="true" aria-labelledby
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread index.html Outdated
Comment thread src/js/app.js Outdated
Comment thread index.html Outdated
<div class="relative z-10 bg-white dark:bg-[#18181b] rounded-[calc(1rem-1.5px)] w-full search-border-inner flex items-center gap-2 transition-all duration-300">
<span class="material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-zinc-400">search</span>
<input id="hero-search" type="text" placeholder="Search organization names..." aria-label="Search GSoC 2026 organizations" class="flex-1 bg-transparent border-0 rounded-2xl py-3 sm:py-4 pl-12 pr-4 text-sm font-medium focus:ring-0 focus:outline-none transition-all text-zinc-900 dark:text-zinc-100" />
<span class="hidden sm:inline-flex items-center gap-0.5 mr-2 px-1.5 py-0.5 rounded-md border border-zinc-300 dark:border-zinc-600 text-[10px] font-mono font-semibold text-zinc-400 dark:text-zinc-500 select-none" aria-hidden="true">⌘K</span>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: The visible search-bar hint chip and help-modal shortcut table only show Mac-specific symbols, but the handler code accepts both Ctrl and Cmd (e.metaKey || e.ctrlKey). On Windows/Linux, users won't see that Ctrl+K, Ctrl+1, and Ctrl+2 also work, which undermines the discoverability this PR aims to improve. Consider displaying both alternatives (e.g., Ctrl/Cmd+K) or adapting the label to the user's platform.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At index.html, line 1359:

<comment>The visible search-bar hint chip and help-modal shortcut table only show Mac-specific `⌘` symbols, but the handler code accepts both `Ctrl` and `Cmd` (`e.metaKey || e.ctrlKey`). On Windows/Linux, users won't see that `Ctrl+K`, `Ctrl+1`, and `Ctrl+2` also work, which undermines the discoverability this PR aims to improve. Consider displaying both alternatives (e.g., `Ctrl/Cmd+K`) or adapting the label to the user's platform.</comment>

<file context>
@@ -1356,6 +1356,7 @@ <h1 class="text-4xl sm:text-5xl md:text-7xl font-extrabold font-headline trackin
           <div class="relative z-10 bg-white dark:bg-[#18181b] rounded-[calc(1rem-1.5px)] w-full search-border-inner flex items-center gap-2 transition-all duration-300">
             <span class="material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-zinc-400">search</span>
             <input id="hero-search" type="text" placeholder="Search organization names..." aria-label="Search GSoC 2026 organizations" class="flex-1 bg-transparent border-0 rounded-2xl py-3 sm:py-4 pl-12 pr-4 text-sm font-medium focus:ring-0 focus:outline-none transition-all text-zinc-900 dark:text-zinc-100" />
+            <span class="hidden sm:inline-flex items-center gap-0.5 mr-2 px-1.5 py-0.5 rounded-md border border-zinc-300 dark:border-zinc-600 text-[10px] font-mono font-semibold text-zinc-400 dark:text-zinc-500 select-none" aria-hidden="true">⌘K</span>
             <button id="hero-search-submit" type="button" class="mr-2 inline-flex items-center justify-center rounded-xl bg-primary px-4 py-2 text-xs sm:text-sm font-bold text-white transition-colors hover:bg-orange-600 focus:outline-none focus:ring-2 focus:ring-primary/30">
               Search
</file context>

Comment thread index.html
@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

@github-actions

Copy link
Copy Markdown
Contributor

⏰ Mentor Review Timeout

The following reviewer(s) did not respond within 24 hours:

Replacement reviewer(s) assigned:


Mentors are expected to review within 24 hours. This is an automated rotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

feat:Add Keyboard Navigation Shortcuts for Better Accessibility

2 participants