File tree 6 files changed +28
-8
lines changed
6 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 21
21
role =" combobox"
22
22
aria-haspopup =" listbox"
23
23
aria-autocomplete =" both"
24
- aria-describedby =" {{ _id }} -valueStateDesc "
24
+ aria-describedby =" {{ valueStateTextId }} "
25
25
/>
26
26
27
27
{{ #unless readonly }}
33
33
?pressed =" {{ _iconPressed }} "
34
34
@click =" {{ _arrowClick }} "
35
35
dir =" {{ dir }} "
36
- accessibleName =" {{ _iconAccessibleNameText }} "
36
+ accessible-name =" {{ _iconAccessibleNameText }} "
37
37
></ui5-icon >
38
38
{{ /unless }}
39
39
</div >
Original file line number Diff line number Diff line change @@ -506,6 +506,10 @@ class ComboBox extends UI5Element {
506
506
return this . valueStateTextMappings [ this . valueState ] ;
507
507
}
508
508
509
+ get valueStateTextId ( ) {
510
+ return this . hasValueState ? `${ this . _id } -valueStateDesc` : undefined ;
511
+ }
512
+
509
513
get valueStateTextMappings ( ) {
510
514
return {
511
515
"Success" : this . i18nBundle . getText ( VALUE_STATE_SUCCESS ) ,
Original file line number Diff line number Diff line change 1
1
<div class =" ui5-multi-combobox-root"
2
2
@focusin ={{ rootFocusIn }}
3
3
@focusout ={{ rootFocusOut }}
4
- role =" combobox"
5
- aria-haspopup =" listbox"
6
- aria-expanded =" {{ open }} "
7
4
>
8
5
<span id =" {{ _id }} -hiddenText-nMore" class =" ui5-hidden-text" >{{ nMoreCountText }} </span >
9
-
6
+
10
7
{{ #if hasValueState }}
11
8
<span id =" {{ _id }} -valueStateDesc" class =" ui5-hidden-text" >{{ valueStateText }} </span >
12
9
{{ /if }}
13
-
10
+
14
11
<ui5-tokenizer slot =" _beginContent"
15
12
show-more
16
13
class =" ui5-multi-combobox-tokenizer"
50
47
@focusin =" {{ _focusin }} "
51
48
@focusout =" {{ _focusout }} "
52
49
@click ={{ _click }}
50
+ role =" combobox"
51
+ aria-haspopup =" listbox"
52
+ aria-expanded =" {{ open }} "
53
53
aria-autocomplete =" both"
54
54
aria-labelledby =" {{ _id }} -hiddenText-nMore"
55
- aria-describedby =" {{ _id }} -valueStateDesc "
55
+ aria-describedby =" {{ valueStateTextId }} "
56
56
/>
57
57
58
58
{{ #unless readonly }}
63
63
@click ={{ _showAllItemsPopover }}
64
64
?pressed =" {{ _iconPressed }} "
65
65
dir =" {{ dir }} "
66
+ accessible-name =" {{ _iconAccessibleNameText }} "
66
67
></ui5-icon >
67
68
{{ /unless }}
68
69
</div >
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
26
26
TOKENIZER_ARIA_CONTAIN_ONE_TOKEN ,
27
27
TOKENIZER_ARIA_CONTAIN_SEVERAL_TOKENS ,
28
28
INPUT_SUGGESTIONS_TITLE ,
29
+ ICON_ACCESSIBLE_NAME ,
29
30
} from "./generated/i18n/i18n-defaults.js" ;
30
31
31
32
// Templates
@@ -679,6 +680,10 @@ class MultiComboBox extends UI5Element {
679
680
return this . valueStateTextMappings [ this . valueState ] ;
680
681
}
681
682
683
+ get valueStateTextId ( ) {
684
+ return this . hasValueState ? `${ this . _id } -valueStateDesc` : undefined ;
685
+ }
686
+
682
687
get _innerInput ( ) {
683
688
if ( isPhone ( ) ) {
684
689
if ( this . allItemsPopover . opened ) {
@@ -695,6 +700,10 @@ class MultiComboBox extends UI5Element {
695
700
return this . i18nBundle . getText ( INPUT_SUGGESTIONS_TITLE ) ;
696
701
}
697
702
703
+ get _iconAccessibleNameText ( ) {
704
+ return this . i18nBundle . getText ( ICON_ACCESSIBLE_NAME ) ;
705
+ }
706
+
698
707
static async onDefine ( ) {
699
708
await Promise . all ( [
700
709
MultiComboBoxItem . define ( ) ,
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ class Token extends UI5Element {
131
131
132
132
_select ( ) {
133
133
this . fireEvent ( "select" ) ;
134
+ this . selected = true ;
134
135
}
135
136
136
137
_delete ( ) {
@@ -152,6 +153,7 @@ class Token extends UI5Element {
152
153
153
154
if ( isEnter ( event ) || isSpace ( event ) ) {
154
155
this . fireEvent ( "select" , { } ) ;
156
+ this . selected = true ;
155
157
}
156
158
}
157
159
Original file line number Diff line number Diff line change 66
66
white-space : nowrap;
67
67
}
68
68
69
+ : host ([selected ]) .ui5-token--icon {
70
+ color : var (--sapButton_Selected_TextColor );
71
+ }
72
+
69
73
.ui5-token--icon {
70
74
color : inherit;
71
75
cursor : pointer;
You can’t perform that action at this time.
0 commit comments