aria-ease 1.6.0 → 1.6.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/README.md
CHANGED
|
@@ -132,7 +132,7 @@ const BlockExample = () => {
|
|
|
132
132
|
export default BlockExample;
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
[Check out more features/functionality in the docs](https://ariaease.
|
|
135
|
+
[Check out more features/functionality in the docs](https://ariaease.web.app/docs)
|
|
136
136
|
|
|
137
137
|
[Start contributing on GitHub](https://github.com/aria-ease/aria-ease)
|
|
138
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aria-ease",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Out-of-the-box accessibility utility package to develop production ready applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/aria-ease/aria-ease/issues"
|
|
27
27
|
},
|
|
28
|
-
"homepage": "https://ariaease.
|
|
28
|
+
"homepage": "https://ariaease.web.app/docs",
|
|
29
29
|
"types": "./aria-ease.d.ts"
|
|
30
30
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {string} radioClass The class of the radio button
|
|
4
4
|
* @param {string} updatedAriaLabel The aria label to be updated to button element
|
|
5
5
|
*/
|
|
6
|
-
export function updateSingleRadioAriaAttribute(radioClass
|
|
6
|
+
export function updateSingleRadioAriaAttribute(radioClass) {
|
|
7
7
|
var radio = document.querySelector(".".concat(radioClass));
|
|
8
8
|
if (!radio) {
|
|
9
9
|
throw new Error('Invalid radio button class provided.');
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
import { HTMLElement } from "../../../Types";
|
|
8
8
|
|
|
9
|
-
export function updateSingleRadioAriaAttribute(radioClass: string
|
|
9
|
+
export function updateSingleRadioAriaAttribute(radioClass: string): void {
|
|
10
10
|
const radio: HTMLElement = document.querySelector(`.${radioClass}`) as HTMLElement;
|
|
11
11
|
|
|
12
|
-
if(
|
|
13
|
-
|
|
12
|
+
if (!radio) {
|
|
13
|
+
throw new Error('Invalid radio button class provided.');
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const currentAriaCheckedState: string = radio.getAttribute('aria-checked') as string
|
|
17
|
-
if(!currentAriaCheckedState) {
|
|
17
|
+
if (!currentAriaCheckedState) {
|
|
18
18
|
throw new Error("Radio element does not have aria-checked attribute")
|
|
19
19
|
}
|
|
20
20
|
|