@@ -75,13 +75,15 @@ type ShellBarLogoAccessibilityAttributes = {
75
75
}
76
76
type ShellBarProfileAccessibilityAttributes = Pick < AccessibilityAttributes , "name" | "expanded" | "hasPopup" > ;
77
77
type ShellBarAreaAccessibilityAttributes = Pick < AccessibilityAttributes , "hasPopup" | "expanded" > ;
78
+ type ShellBarBrandingAccessibilityAttributes = Pick < AccessibilityAttributes , "name" | "role" > ;
78
79
type ShellBarAccessibilityAttributes = {
79
80
logo ?: ShellBarLogoAccessibilityAttributes
80
81
notifications ?: ShellBarAreaAccessibilityAttributes
81
82
profile ?: ShellBarProfileAccessibilityAttributes ,
82
83
product ?: ShellBarAreaAccessibilityAttributes
83
84
search ?: ShellBarAreaAccessibilityAttributes
84
85
overflow ?: ShellBarAreaAccessibilityAttributes
86
+ branding ?: ShellBarBrandingAccessibilityAttributes
85
87
} ;
86
88
87
89
type ShellBarNotificationsClickEventDetail = {
@@ -351,6 +353,7 @@ class ShellBar extends UI5Element {
351
353
* - **product** - `product.expanded` and `product.hasPopup`.
352
354
* - **search** - `search.hasPopup`.
353
355
* - **overflow** - `overflow.expanded` and `overflow.hasPopup`.
356
+ * - **branding** - `branding.role` and `branding.name`.
354
357
*
355
358
* The accessibility attributes support the following values:
356
359
*
@@ -1422,6 +1425,10 @@ class ShellBar extends UI5Element {
1422
1425
return ShellBar . i18nBundle . getText ( SHELLBAR_OVERFLOW ) ;
1423
1426
}
1424
1427
1428
+ get _brandingText ( ) {
1429
+ return this . accessibilityAttributes . branding ?. name || this . primaryTitle ;
1430
+ }
1431
+
1425
1432
get hasContentItems ( ) {
1426
1433
return this . contentItems . length > 0 ;
1427
1434
}
@@ -1520,6 +1527,13 @@ class ShellBar extends UI5Element {
1520
1527
hasPopup : this . accessibilityAttributes . overflow ?. hasPopup || "menu" as const ,
1521
1528
expanded : overflowExpanded === undefined ? this . _overflowPopoverExpanded : overflowExpanded ,
1522
1529
} ,
1530
+ branding : {
1531
+ "title" : this . _brandingText ,
1532
+ "accessibilityAttributes" : {
1533
+ role : this . accessibilityAttributes . branding ?. role ,
1534
+ name : this . accessibilityAttributes . branding ?. name ,
1535
+ } ,
1536
+ } ,
1523
1537
} ,
1524
1538
} ;
1525
1539
}
0 commit comments