Skip to content

a11y: add proper keyboard activation for share button#4

Closed
Aarya-Chaudhari wants to merge 3 commits intoAOSSIE-Org:mainfrom
Aarya-Chaudhari:a11y/add-aria-labels
Closed

a11y: add proper keyboard activation for share button#4
Aarya-Chaudhari wants to merge 3 commits intoAOSSIE-Org:mainfrom
Aarya-Chaudhari:a11y/add-aria-labels

Conversation

@Aarya-Chaudhari
Copy link
Copy Markdown
Contributor

@Aarya-Chaudhari Aarya-Chaudhari commented Dec 22, 2025

This PR improves accessibility by enabling proper keyboard interaction
for the social share button.

  • Enter key activates the button on keydown
  • Space key activates the button on keyup

This follows native button behavior and improves usability for
keyboard and assistive-technology users without changing UI or behavior.

Summary by CodeRabbit

  • Style
    • Minor formatting cleanup in the share-button code (removed an extra blank line). No user-visible or behavioral changes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 22, 2025

Walkthrough

Removed an extra blank line in the createButton implementation of the social share button; change is purely formatting (fewer newlines) and does not alter logic, control flow, exports, or runtime behavior.

Changes

Cohort / File(s) Summary
Formatting cleanup
src/social-share-button.js
Removed one extra blank line between the innerHTML template and the subsequent this.button assignment in createButton. No behavior, control flow, or API changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Quick check that only whitespace was removed and no tokens or semicolons were affected.

Poem

🐇 I nudge a line and make it neat,
A tidy hop, a tiny feat,
No logic changed, just fluff made slim,
A neat new pace for code to brim,
The rabbit stamps a quiet beat.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to add keyboard activation for the share button, but the actual change only removes a blank line from the code with no keyboard event handler implementations or behavior modifications. Update the PR title to accurately reflect the actual change, such as 'refactor: remove redundant blank line in createButton' or align the code changes with the stated keyboard accessibility objective.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 179f604 and 4b636e0.

📒 Files selected for processing (1)
  • src/social-share-button.js
💤 Files with no reviewable changes (1)
  • src/social-share-button.js

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 929f699 and 7710300.

📒 Files selected for processing (1)
  • src/social-share-button.js
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-21T12:11:14.980Z
Learnt from: kpj2006
Repo: AOSSIE-Org/SocialShareButton PR: 1
File: src/social-share-button.js:10-11
Timestamp: 2025-12-21T12:11:14.980Z
Learning: SSR compatibility is important for public libraries. For files under src/, ensure the SocialShareButton (and related public APIs) render correctly in SSR environments across frameworks. Check for browser-only globals, conditional code paths, correct hydration behavior, and that the library exports behave consistently when used in SSR.

Applied to files:

  • src/social-share-button.js

Comment thread src/social-share-button.js Outdated
Comment thread src/social-share-button.js Outdated
@Aarya-Chaudhari
Copy link
Copy Markdown
Contributor Author

Thanks for the review!

You’re right — native elements already support Enter and Space
activation. I’ve removed the redundant keyboard event listeners and now
rely on the built-in behavior.

</svg>
<span>${this.options.buttonText}</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.

have you changed anything??

or you should close the pr since there is no active change

@kpj2006 kpj2006 closed this Feb 20, 2026
kpj2006 pushed a commit that referenced this pull request Mar 20, 2026
feat: add Preact wrapper for SocialShareButton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants