Skip to content

Fix The accessibility attribute aria-invalid has an error message instead of a 'true' value #2

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

supra08
Copy link

@supra08 supra08 commented May 13, 2025

Important

Adds aria-invalid attribute to fields with errors in useFormik for better accessibility and fixes a formatting issue in Formik.tsx.

  • Accessibility:
    • Adds aria-invalid attribute with value 'true' to fields with errors in useFormik in Formik.tsx.
  • Misc:
    • Fixes formatting issue in Formik.tsx by correcting a misplaced closing brace.

This description was created by Ellipsis for df719db. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to df719db in 1 minute and 25 seconds. Click for details.
  • Reviewed 43 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/formik/src/Formik.tsx:433
  • Draft comment:
    Fixed closing braces in the useEffect block. Verify the extra '}' correctly closes the intended block.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify the correctness of the code, which is against the rules. It does not provide a specific suggestion or point out a clear issue. Instead, it asks the author to confirm their intention, which is not allowed.
2. packages/formik/src/Formik.tsx:919
  • Draft comment:
    Set aria-invalid explicitly to 'true' when an error exists, avoiding use of the error message as its value.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. packages/formik/src/Formik.tsx:949
  • Draft comment:
    Updated the dependency array for getFieldProps to include state.errors and state.touched, ensuring the aria-invalid logic updates correctly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining what was done in the code without providing any actionable feedback or suggestions. It doesn't ask for confirmation or suggest any changes.
4. packages/formik/src/Formik.tsx:436
  • Draft comment:
    It looks like there is an extra closing '}' on line 436. The diff changes the single '}' to '}}', which may be unintentional. Please double-check the bracket pairing in the useEffect hook.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. packages/formik/src/Formik.tsx:1226
  • Draft comment:
    A newline is not present at the end of the file. While this is a minor style issue (and many formatters can fix it automatically), it would be good to add a final newline for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment is technically correct about a change in the diff, missing newlines at the end of files are very minor style issues that are automatically handled by most formatters and IDEs. The comment doesn't point out a significant issue that needs to be fixed. According to the rules, we should not make comments that are obvious or unimportant. The comment is factually accurate and points out a real change. Some build systems and tools do expect files to end with newlines. While technically accurate, this is exactly the kind of minor style issue that the rules say we should avoid commenting on. It's not important enough to warrant a PR comment. Delete this comment as it points out an unimportant style issue that doesn't warrant a PR comment.

Workflow ID: wflow_MegRBkD3xlwVCJpZ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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.

1 participant