@softheon/armature 21.16.1 → 21.18.0
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/package.json
CHANGED
|
@@ -1243,6 +1243,22 @@ interface NavPanelSubnode {
|
|
|
1243
1243
|
interface NavNodeBadgeConfig {
|
|
1244
1244
|
/** Badge type - 'notification' for red badges, 'status' for primary badges */
|
|
1245
1245
|
type: 'notification' | 'status';
|
|
1246
|
+
/**
|
|
1247
|
+
* Accessible name for a 'notification' badge.
|
|
1248
|
+
* @description Required for notification badges so the `role="status"` region has an accessible name.
|
|
1249
|
+
* @note To interpolate the badge count use a translation key containing `{{count}}`,
|
|
1250
|
+
* e.g. `'armature.badge.notification-aria'`. Literal strings are not interpolated.
|
|
1251
|
+
* @example 'armature.badge.notification-aria'
|
|
1252
|
+
* @example
|
|
1253
|
+
* ```json
|
|
1254
|
+
* "armature": {
|
|
1255
|
+
* "badge": {
|
|
1256
|
+
* "notification-aria": "{{count}} unread notifications"
|
|
1257
|
+
* }
|
|
1258
|
+
* }
|
|
1259
|
+
* ```
|
|
1260
|
+
*/
|
|
1261
|
+
notificationAriaLabel?: string;
|
|
1246
1262
|
}
|
|
1247
1263
|
/**
|
|
1248
1264
|
* Available badge data
|
|
@@ -3845,11 +3861,21 @@ declare class SofBadgeComponent implements OnInit {
|
|
|
3845
3861
|
isNotificationType: boolean;
|
|
3846
3862
|
/** The icon class- this should be a Phosphor Icons class, type bold */
|
|
3847
3863
|
iconClass: string;
|
|
3848
|
-
/**
|
|
3864
|
+
/**
|
|
3865
|
+
* The badge aria label
|
|
3866
|
+
* @description Required when `isNotificationType` is true, so the notification's
|
|
3867
|
+
* `role="status"` region has an accessible name. Supports `{{count}}` interpolation
|
|
3868
|
+
* of `badgeText` when the value is a translation key.
|
|
3869
|
+
* @note Not used for standard badges, whose visible text is their accessible name.
|
|
3870
|
+
*/
|
|
3849
3871
|
badgeAria: string;
|
|
3850
|
-
/**
|
|
3872
|
+
/**
|
|
3873
|
+
* The icon aria label
|
|
3874
|
+
* @deprecated Not used. The badge icon is always decorative (`aria-hidden`).
|
|
3875
|
+
* Name the badge via `badgeAria` instead.
|
|
3876
|
+
*/
|
|
3851
3877
|
iconAria: string;
|
|
3852
|
-
/** The
|
|
3878
|
+
/** The badge tooltip data */
|
|
3853
3879
|
tooltipData: BadgeTooltipData;
|
|
3854
3880
|
/**
|
|
3855
3881
|
* Any logic related to ag grid cell renderer data can be added here
|
|
@@ -3932,7 +3958,18 @@ interface ButtonBadgeConfig {
|
|
|
3932
3958
|
* Removes role="menu" from Material Menu elements.
|
|
3933
3959
|
* Removes role="menuitem" from Material Menu Item elements.
|
|
3934
3960
|
* (per wcag audit)
|
|
3935
|
-
|
|
3961
|
+
*
|
|
3962
|
+
* A panel stripped of `role` is no longer a menu, so the attributes that only
|
|
3963
|
+
* make sense for a menu are removed with it:
|
|
3964
|
+
* - the trigger's `aria-controls`, which then points at a role-less `div`;
|
|
3965
|
+
* axe reports `aria-controls` + `aria-haspopup` on such a target as an
|
|
3966
|
+
* invalid ARIA attribute value, even when the id resolves.
|
|
3967
|
+
* - the panel's `aria-label` / `aria-labelledby`, which are prohibited on a
|
|
3968
|
+
* role-less element. The menu items carry their own text, so the panel
|
|
3969
|
+
* label is redundant once the menu role is gone.
|
|
3970
|
+
*
|
|
3971
|
+
* Shared by `sof-dropdown-button`, `sof-utility-button` and `sof-header`.
|
|
3972
|
+
*/
|
|
3936
3973
|
declare const removeMenuRole: () => void;
|
|
3937
3974
|
|
|
3938
3975
|
/**
|