Skip to content
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

feature: add aria-disabled to Month component #4702

Conversation

MatteoPieroni
Copy link
Contributor

@MatteoPieroni MatteoPieroni commented Apr 17, 2024

Summary

This PR addresses an issue where the Month component is missing the attribute aria-disabled on its disabled items.

Changes made

  • Updated the Month component to add the aria-disabled attribute over its disabled items
  • Made the logic to find the disabled month unit shareable in a reusable helper function
  • Updated the corresponding test cases to also check for the existence of the aria-disabled attribute along with the classname

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!

What to expect from this code review:
  • Comments posted to any areas of potential concern or improvement.
  • Detailed feedback or actions needed to resolve issues that are found.
  • Turnaround times vary, but we aim to be swift.

@MatteoPieroni you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 23
- 21

66% JavaScript
34% JavaScript (tests)

Type of change

Feature - These changes are adding a new feature or improvement to existing code.
1 Message
It looks like the description for this pull request is either blank or very short. Adding a high-level summary will help our reviewers provide better feedback. Feel free to include questions for PullRequest reviewers and make specific feedback requests.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.10%. Comparing base (4f39359) to head (356f0d2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4702   +/-   ##
=======================================
  Coverage   97.09%   97.10%           
=======================================
  Files          28       28           
  Lines        2653     2656    +3     
  Branches     1138     1140    +2     
=======================================
+ Hits         2576     2579    +3     
  Misses         77       77           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatteoPieroni MatteoPieroni changed the title feature: add tests for aria-disabled Month component feature: add aria-disabled to Month component Apr 17, 2024
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

The code seems to match the PR description and includes good test coverage to verify the changes. I didn't see any issues, nice job!

Image of Joey G Joey G


Reviewed with ❤️ by PullRequest

@@ -545,31 +545,27 @@ export default class Month extends React.Component {
}
};

isMonthDisabled = (month) => {
Copy link

Choose a reason for hiding this comment

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

Nice job extracting out this logic 👍

◽ Compliment

Image of Joey G Joey G

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

This PR is nicely done—straightforward, clean, and well-tested. I didn't notice any issues below, and it's great to see this a finer detail of the ARIA implementation being fixed. Thanks for taking care of this!

Image of Ryan Ryan


Reviewed with ❤️ by PullRequest

@martijnrusschen martijnrusschen merged commit bb21fb9 into Hacker0x01:main Apr 17, 2024
6 checks passed
@MatteoPieroni
Copy link
Contributor Author

MatteoPieroni commented Apr 18, 2024

Thank you for your reviews and having merged this 🥇

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.

None yet

2 participants