-
-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: refactor copy and share components for better accessibility 🪄✨ #1492
chore: refactor copy and share components for better accessibility 🪄✨ #1492
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, 0xabdulkhalid, for creating this pull request and contributing to LinksHub! 💗
The maintainers will review this Pull Request and provide feedback as soon as possible! 😇
We appreciate your patience and contribution, Keep up the great work! 😀
Hi there @rupali-codes, @CBID2 👋🏻 I hope you're doing well. I wanted to let you know about the PR I've created for the The changes made in this PR bring significant improvements in terms of accessibility, making the components more inclusive and user-friendly. Additionally, I've streamlined the code, removing unnecessary elements and optimizing the overall performance. I believe these updates will greatly contribute to the core functionality and usability of the project. It would be amazing if you could review and consider merging this PR. Also, to support my work, I'd appreciate it if you could add the Please let me know your thoughts, and I'm open to any feedback or suggestions. Thank you for your time and consideration. |
@0xabdulkhalid you changed quite few behaviour , like hover effect also the pop-up that use to come on copying the link from clipboard that. bandicam.2023-08-04.22-48-23-592.mp4@CBID2 @rupali-codes please look into this |
Ooh you're right @k-deepak04. Not having the hover effect can make it difficult for readers, especially for those who are low-vision, to know when to copy the link @0xabdulkhalid |
You're saying about this Purple Colored Tooltip right ? But you can see that it provided Two Clues at once. One is explicitly designed with Another thing is we don't need the You could experience how both tooltip's are layered on top of each other, Hope you understood. There's already The You can look this demonstration 👀 Capture_2023-08-05-08-32-14.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xabdulkhalid have you removed that tooltip?
@rupali-codes Yeah, I removed the Tooltip. Instead i changed icon, So if the user successfully copied the link then the icon with change to success and then after 2 seconds it will revert to normal state (copy icon). Capture_2023-08-05-12-26-06.mp4 |
But its looking kinda confusing, could you please add the tooltip while changing the icon as well? that would be more helpful. And even you can use React-tooltip if you want to, or just add as it was before :) Thanks |
@rupali-codes as you wish, I will make the tooltip to be viewed once the user copied the link. It will say Wait, there's a small bug i need to fix now. I will update after fixing that! |
@0xabdulkhalid could you just make it Copied? also Copy on hover :) |
Done as you requested @rupali-codes 👍🏻 Capture_2023-08-05-13-22-34.mp4 |
Is this ok @rupali-codes ?Capture_2023-08-05-13-44-53.mp4 |
Looks better now in my opinion @rupali-codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore my previous comment @0xabdulkhalid. For some odd reason, the deployment failed. @rupali-codes, can you fix this?
@CBID2 I think the I tried to install that on local, but it doesn't. There's some conflicts on packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check, deploymnet is failing
Guys @CBID2, @k-deepak04 I'm closing this. For some reason i can't install Here's the new Pull #1517 |
Fixes Issue
Closes #1479
Changes proposed
This PR introduces several significant enhancements to the
CopyToClipboard.tsx
andShare.tsx
files, focusing on code refactoring and accessibility improvements. The key changes are as follows:Code Refactoring: Both
CopyToClipboard.tsx
andShare.tsx
components have undergone code refactoring to remove unnecessary elements, such as wrapping divs, and improve code readability and maintainability.Improved Accessibility: The accessibility of the components has been greatly enhanced. We replaced the
title
attributes with more descriptive and accessiblearia-label
attributes for the icons. Additionally, we introducedaria-live="polite"
to announce changes to screen readers in a polite manner.Styling Enhancement: The inline styles in the components have been removed, and we now rely on CSS classes for styling. This makes the code more organized and easier to manage.
Reduced Bloatware: We have trimmed unnecessary elements and styles, resulting in a leaner and more efficient codebase.
Icon Change on Success: When the copy action is successful, the copy icon now changes to a checkmark icon (
FaCheckSquare
). This gives users clear feedback on the success of the copy operation.Resetting Copied Icon: The copied icon now resets back to the original copy icon (
FaRegCopy
) after 2 seconds, ensuring a smoother user experience.With these improvements, the
CopyToClipboard
andShare
components are now more accessible, efficient, and user-friendly. The PR contributes to the overall enhancement of the repository's codebase and user experience.Demonstrating Video
Capture_2023-08-04-21-34-43.mp4
[ This video will not demonstrates the accessibility feature, but it can demonstrate other changes made in this PR ]
[ My device didn't allow to record the internal audio during recording, So that i can't demonstrate the accessibility feature that announcing
Copy Link
andLink Copied!
after copying the link. Sorry for the inconvenience.]