@thepalaceproject/circulation-admin 1.41.0-post.38 → 1.41.0-post.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,14 +10,6 @@ object-assign
10
10
  http://jedwatson.github.io/classnames
11
11
  */
12
12
 
13
- /*!
14
- * JavaScript Cookie v2.2.1
15
- * https://github.com/js-cookie/js-cookie
16
- *
17
- * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
18
- * Released under the MIT license
19
- */
20
-
21
13
  /*!
22
14
  * Programatically add the following
23
15
  */
@@ -29,7 +21,7 @@ object-assign
29
21
  * @license MIT
30
22
  */
31
23
 
32
- /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
24
+ /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
33
25
 
34
26
  /*! @preserve
35
27
  * numeral.js
package/package.json CHANGED
@@ -39,7 +39,7 @@
39
39
  "@nypl/dgx-svg-icons": "0.3.14",
40
40
  "@reduxjs/toolkit": "^2.2.5",
41
41
  "@tanstack/react-query": "^4.36.1",
42
- "@thepalaceproject/web-opds-client": "^1.1.0",
42
+ "@thepalaceproject/web-opds-client": "^1.2.0",
43
43
  "bootstrap": "^3.3.6",
44
44
  "classnames": "^2.3.1",
45
45
  "draft-convert": "^2.1.5",
@@ -49,7 +49,7 @@
49
49
  "isomorphic-fetch": "^3.0.0",
50
50
  "library-simplified-reusable-components": "1.3.18",
51
51
  "numeral": "^2.0.6",
52
- "opds-feed-parser": "0.0.17",
52
+ "opds-feed-parser": "0.1.0",
53
53
  "prop-types": "^15.7.2",
54
54
  "qs": "^6.15.2",
55
55
  "react": "^16.8.6",
@@ -152,5 +152,5 @@
152
152
  "*.{js,jsx,ts,tsx,css,md}": "prettier --write",
153
153
  "*.{js,css,md}": "prettier --write"
154
154
  },
155
- "version": "1.41.0-post.38"
155
+ "version": "1.41.0-post.41"
156
156
  }
@@ -130,6 +130,21 @@ describe("CollectionReapButton", () => {
130
130
  expect(reapCollection).toHaveBeenCalledWith(42);
131
131
  });
132
132
 
133
+ it("keeps both feedback live regions mounted before any feedback appears", async () => {
134
+ const user = userEvent.setup();
135
+ const { container } = renderButton();
136
+ await expandPanel(user);
137
+ // Both regions must already exist at a fixed politeness when their content
138
+ // mutates; several screen readers won't announce a region inserted
139
+ // alongside its text, nor a politeness change on an already-mounted node.
140
+ const politeRegion = container.querySelector('[aria-live="polite"]');
141
+ const assertiveRegion = container.querySelector('[aria-live="assertive"]');
142
+ expect(politeRegion).toBeInTheDocument();
143
+ expect(politeRegion).toBeEmptyDOMElement();
144
+ expect(assertiveRegion).toBeInTheDocument();
145
+ expect(assertiveRegion).toBeEmptyDOMElement();
146
+ });
147
+
133
148
  it("shows success feedback after queuing", async () => {
134
149
  const user = userEvent.setup();
135
150
  renderButton();
@@ -139,6 +154,11 @@ describe("CollectionReapButton", () => {
139
154
  const feedback = screen.getByText(/reap task queued\./i);
140
155
  expect(feedback).toBeInTheDocument();
141
156
  expect(feedback).toHaveClass("alert", "alert-success");
157
+ // Success routes to the permanently-polite region.
158
+ expect(feedback.closest("[aria-live]")).toHaveAttribute(
159
+ "aria-live",
160
+ "polite"
161
+ );
142
162
  });
143
163
  });
144
164
 
@@ -154,6 +174,11 @@ describe("CollectionReapButton", () => {
154
174
  const feedback = screen.getByText("Something went wrong");
155
175
  expect(feedback).toBeInTheDocument();
156
176
  expect(feedback).toHaveClass("alert", "alert-danger");
177
+ // Errors route to the permanently-assertive region.
178
+ expect(feedback.closest("[aria-live]")).toHaveAttribute(
179
+ "aria-live",
180
+ "assertive"
181
+ );
157
182
  });
158
183
  });
159
184