@checkstack/ui 1.1.0 → 1.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @checkstack/ui
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0603d39]
8
+ - @checkstack/frontend-api@0.3.7
9
+
10
+ ## 1.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - a340781: Improve accessibility of SubscribeButton component by adding appropriate ARIA labels and attributes.
15
+ - 8d2660d: Added `@testing-library/react` to devDependencies.
16
+ - Updated dependencies [0ebbe56]
17
+ - @checkstack/common@0.6.3
18
+ - @checkstack/frontend-api@0.3.6
19
+
3
20
  ## 1.1.0
4
21
 
5
22
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "dependencies": {
@@ -29,6 +29,7 @@
29
29
  "devDependencies": {
30
30
  "typescript": "^5.0.0",
31
31
  "@types/react": "^18.2.0",
32
+ "@testing-library/react": "^16.0.0",
32
33
  "@checkstack/test-utils-frontend": "0.0.3",
33
34
  "@checkstack/tsconfig": "0.0.3",
34
35
  "@checkstack/scripts": "0.1.1"
@@ -79,11 +79,26 @@ export const SubscribeButton: React.FC<SubscribeButtonProps> = ({
79
79
  ? "Unsubscribe from notifications"
80
80
  : "Subscribe to notifications"
81
81
  }
82
+ aria-label={
83
+ loading
84
+ ? isSubscribed
85
+ ? "Unsubscribing..."
86
+ : "Subscribing..."
87
+ : isSubscribed
88
+ ? "Unsubscribe from notifications"
89
+ : "Subscribe to notifications"
90
+ }
91
+ aria-pressed={isSubscribed}
82
92
  >
83
93
  {loading ? (
84
- <span className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
94
+ <span
95
+ role="status"
96
+ aria-label="Loading"
97
+ className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"
98
+ />
85
99
  ) : (
86
100
  <Bell
101
+ aria-hidden="true"
87
102
  className={cn(
88
103
  "h-4 w-4 transition-all duration-300",
89
104
  isSubscribed && "fill-current",