aloha-vue 1.2.277 → 1.2.279
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
|
@@ -7,10 +7,18 @@
|
|
|
7
7
|
---
|
|
8
8
|
# Versions
|
|
9
9
|
|
|
10
|
+
## 1.2.279
|
|
11
|
+
|
|
12
|
+
- Removed the `disabled` attribute from the `HTML` output of the `ASelect` component to improve accessibility.
|
|
13
|
+
|
|
14
|
+
## 1.2.278
|
|
15
|
+
|
|
16
|
+
- Fixed the `disabled` state handling for elements with `type="link"` in the `AElement` component.
|
|
17
|
+
|
|
10
18
|
## 1.2.277
|
|
11
19
|
|
|
12
20
|
- Removed the unnecessary `role="button"` attribute from buttons in`AInputCurrency` and `AInputNumber` components.
|
|
13
|
-
|
|
21
|
+
- Added `title` and `textScreenReader` props for buttons in `AInputCurrency` and `AInputNumber` to enhance accessibility and screen reader support.
|
|
14
22
|
|
|
15
23
|
## 1.2.276
|
|
16
24
|
|
package/package.json
CHANGED
package/src/AElement/AElement.js
CHANGED
|
@@ -10,6 +10,7 @@ import AriaLabelAPI from "../ATranslation/compositionAPI/AriaLabelAPI";
|
|
|
10
10
|
import AttributesAPI from "./comositionAPI/AttributesAPI";
|
|
11
11
|
import ClickAPI from "./comositionAPI/ClickAPI";
|
|
12
12
|
import ComponentLocalAPI from "./comositionAPI/ComponentLocalAPI";
|
|
13
|
+
import DisabledAPI from "./comositionAPI/DisabledAPI";
|
|
13
14
|
import HtmlTitleAPI from "./comositionAPI/HtmlTitleAPI";
|
|
14
15
|
import LoadingAPI from "./comositionAPI/LoadingAPI";
|
|
15
16
|
import RouterLinkAPI from "./comositionAPI/RouterLinkAPI";
|
|
@@ -286,6 +287,10 @@ export default {
|
|
|
286
287
|
isRouterLink,
|
|
287
288
|
} = RouterLinkAPI(props);
|
|
288
289
|
|
|
290
|
+
const {
|
|
291
|
+
disabledLocal,
|
|
292
|
+
} = DisabledAPI(props);
|
|
293
|
+
|
|
289
294
|
const {
|
|
290
295
|
tagLocal,
|
|
291
296
|
} = TagAPI(props, {
|
|
@@ -344,6 +349,7 @@ export default {
|
|
|
344
349
|
ariaLabelAttributes,
|
|
345
350
|
attributesToExcludeFromRender,
|
|
346
351
|
componentLocal,
|
|
352
|
+
disabledLocal,
|
|
347
353
|
elementRef,
|
|
348
354
|
htmlTitleAttributes,
|
|
349
355
|
isLoadingLeft,
|
|
@@ -377,7 +383,7 @@ export default {
|
|
|
377
383
|
],
|
|
378
384
|
type: this.typeAttribut,
|
|
379
385
|
tabindex: this.tabindex,
|
|
380
|
-
disabled: this.
|
|
386
|
+
disabled: this.disabledLocal,
|
|
381
387
|
ariaDisabled: this.ariaDisabled,
|
|
382
388
|
"aria-pressed": this.isSwitchActive,
|
|
383
389
|
isAllRowsSelected: undefined, // TODO: ATable
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
export default function DisabledAPI(props) {
|
|
7
|
+
const type = toRef(props, "type");
|
|
8
|
+
const disabled = toRef(props, "disabled");
|
|
9
|
+
|
|
10
|
+
const disabledLocal = computed(() => {
|
|
11
|
+
if (["button", "submit", "reset"].indexOf(type.value) !== -1 &&
|
|
12
|
+
disabled.value) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return undefined;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
disabledLocal,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -486,7 +486,6 @@ export default {
|
|
|
486
486
|
|
|
487
487
|
const {
|
|
488
488
|
ariaLabelledby,
|
|
489
|
-
attributesDisabled,
|
|
490
489
|
containerId,
|
|
491
490
|
idForList,
|
|
492
491
|
tabindex,
|
|
@@ -603,7 +602,6 @@ export default {
|
|
|
603
602
|
return {
|
|
604
603
|
ariaDescribedbyLocal,
|
|
605
604
|
ariaLabelledby,
|
|
606
|
-
attributesDisabled,
|
|
607
605
|
attributesToExcludeFromRender,
|
|
608
606
|
buttonRef,
|
|
609
607
|
clearModel,
|
|
@@ -727,7 +725,6 @@ export default {
|
|
|
727
725
|
onKeydown: this.handleKeydown,
|
|
728
726
|
onFocus: this.onFocus,
|
|
729
727
|
onBlur: this.onBlur,
|
|
730
|
-
...this.attributesDisabled,
|
|
731
728
|
}, [
|
|
732
729
|
this.$slots.fixedPlaceholder ?
|
|
733
730
|
this.$slots.fixedPlaceholder({
|
|
@@ -24,17 +24,8 @@ export default function AttributesAPI(props, {
|
|
|
24
24
|
return disabled.value ? undefined : 0;
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
const attributesDisabled = computed(() => {
|
|
28
|
-
const ATTRIBUTES = {};
|
|
29
|
-
if (disabled.value) {
|
|
30
|
-
ATTRIBUTES.disabled = true;
|
|
31
|
-
}
|
|
32
|
-
return ATTRIBUTES;
|
|
33
|
-
});
|
|
34
|
-
|
|
35
27
|
return {
|
|
36
28
|
ariaLabelledby,
|
|
37
|
-
attributesDisabled,
|
|
38
29
|
containerId,
|
|
39
30
|
idForList,
|
|
40
31
|
tabindex,
|