File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 3
3
tabindex =" {{ tabIndex }} "
4
4
dir =" {{ _dir }} "
5
5
viewBox =" 0 0 512 512"
6
- role =" {{ role }} "
6
+ role =" {{ effectiveAccessibleRole }} "
7
7
focusable =" false"
8
8
preserveAspectRatio =" xMidYMid meet"
9
9
aria-label =" {{ effectiveAccessibleName }} "
Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ const metadata = {
85
85
type : Boolean ,
86
86
} ,
87
87
88
+ /**
89
+ * Defines the accessibility role of the component.
90
+ * @defaultvalue ""
91
+ * @private
92
+ * @since 1.0.0-rc.15
93
+ */
94
+ role : {
95
+ type : String ,
96
+ } ,
97
+
88
98
/**
89
99
* @private
90
100
*/
@@ -251,7 +261,11 @@ class Icon extends UI5Element {
251
261
return this . interactive ? "0" : "-1" ;
252
262
}
253
263
254
- get role ( ) {
264
+ get effectiveAccessibleRole ( ) {
265
+ if ( this . role ) {
266
+ return this . role ;
267
+ }
268
+
255
269
if ( this . interactive ) {
256
270
return "button" ;
257
271
}
You can’t perform that action at this time.
0 commit comments