File tree 3 files changed +23
-0
lines changed
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 25
25
?required =" {{ required }} "
26
26
aria-required =" {{ required }} "
27
27
aria-labelledby ={{ ariaLabelledBy }}
28
+ aria-describedby ={{ ariaDescribedBy }}
28
29
maxlength =" {{ _exceededTextProps.calcedMaxLength }} "
29
30
.value =" {{ value }} "
30
31
@input =" {{ _oninput }} "
41
42
<span id =" {{ _id }} -exceededText" class =" ui5-textarea-exceeded-text" >{{ _exceededTextProps.exceededText }} </span >
42
43
{{ /if }}
43
44
45
+ {{ #if hasValueState }}
46
+ <span id =" {{ _id }} -valueStateDesc" class =" ui5-hidden-text" >{{ ariaValueStateHiddenText }} </span >
47
+ {{ /if }}
48
+
44
49
<slot name =" formSupport" ></slot >
45
50
</div >
46
51
Original file line number Diff line number Diff line change @@ -543,6 +543,22 @@ class TextArea extends UI5Element {
543
543
return this . showExceededText ? `${ this . _id } -exceededText` : undefined ;
544
544
}
545
545
546
+ get ariaDescribedBy ( ) {
547
+ return this . hasValueState ? `${ this . _id } -valueStateDesc` : undefined ;
548
+ }
549
+
550
+ get ariaValueStateHiddenText ( ) {
551
+ if ( ! this . hasValueState ) {
552
+ return ;
553
+ }
554
+
555
+ if ( this . hasCustomValueState ) {
556
+ return this . valueStateMessageText . map ( el => el . textContent ) . join ( " " ) ;
557
+ }
558
+
559
+ return this . valueStateText ;
560
+ }
561
+
546
562
get ariaInvalid ( ) {
547
563
return this . valueState === "Error" ? "true" : undefined ;
548
564
}
Original file line number Diff line number Diff line change
1
+ @import "./InvisibleTextStyles.css" ;
2
+
1
3
: host (: not ([hidden ])) {
2
4
display : inline-block;
3
5
}
You can’t perform that action at this time.
0 commit comments