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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform toHaveErrorMessage to Spec and Rename to toHaveAccessibleErrorMessage #503

Merged
merged 2 commits into from Jul 18, 2023

Commits on Jul 18, 2023

  1. fix: Conform toHaveErrorMessage to Spec and Rename

    Included Changes:
    - According to the WAI-ARIA spec, passing an invalid
      `id` to `aria-errormessage` now fails assertion.
      This means that any empty spaces inside
      `aria-errormessage` will now cause test failures.
    
    - According to the WAI-ARIA spec, developers can now
      assert that an accessible error message is missing
      if `aria-invalid` is `false` (or if the
      `aria-errormessage` attribute is invalid).
    
    - Updated the error message and test cases surrounding
      the requirement for `aria-invalid`. They are now
      more detailed/accurate.
    
    - Renamed `toHaveErrorMessage` to
      `toHaveAccessibleErrorMessage` to be consistent with
      the other a11y-related methods (`toHaveAccessibleName`
      and `toHaveAccessibleDescription`).
       - Note: This deprecates the previous
       `toHaveErrorMessage` method.
    
    - Updated documentation. Similar to the
      `toHaveAccessibleDescription` method, this description
      is much more lean, as the reader can simply read the
      WAI ARIA spec for additional details/requirements.
    ITenthusiasm committed Jul 18, 2023
    Copy the full SHA
    878ad7d View commit details
    Browse the repository at this point in the history
  2. refactor: Simplify Exports from matchers.js

    This makes the code easier to maintain as more
    exports are added.
    ITenthusiasm committed Jul 18, 2023
    Copy the full SHA
    fbe6feb View commit details
    Browse the repository at this point in the history