Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/jest-dom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.16.5
Choose a base ref
...
head repository: testing-library/jest-dom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.17.0
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Jul 18, 2023

  1. feat: New toHaveAccessibleErrorMessage better implementing the spec…

    …, deprecate `toHaveErrorMessage` (#503)
    
    * 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.
    
    * refactor: Simplify Exports from `matchers.js`
    
    This makes the code easier to maintain as more
    exports are added.
    ITenthusiasm authored Jul 18, 2023
    Copy the full SHA
    d717c66 View commit details
Loading