@@ -65,6 +65,12 @@ ComponentDefinitions:
6565 InformationTextColor:"#000000",
6666 InformationBckgndColor:"#ffffff"
6767 }
68+ Timer :
69+ PropertyKind : Input
70+ DisplayName : Timer
71+ Description : You can desactivate the timer
72+ DataType : Boolean
73+ Default : =true
6874 Properties :
6975 AutoHeight : =Sum(GalleryNotifs.AllItems,HtmlTextNotif.Height) + (GalleryNotifs.AllItemsCount*10)+10
7076 ContentLanguage : ="" // YAML Snipet component by David Zoonekyndt https://dz13n.wordpress.com/
@@ -78,9 +84,14 @@ ComponentDefinitions:
7884 Control : Gallery@2.15.0
7985 Variant : VariableHeight
8086 Properties :
87+ AccessibleLabel : ="Notifications"
8188 Height : =Parent.Height
89+ ItemAccessibleLabel : |-
90+ =ThisItem.Title&".
91+ "&ThisItem.Text
8292 Items : =colNotifications
8393 ShowScrollbar : =false
94+ TabIndex : =0
8495 TemplatePadding : =0
8596 Width : =Parent.Width
8697 Children :
@@ -157,6 +168,7 @@ ComponentDefinitions:
157168 - ButtonRemoveNotif :
158169 Control : Button@0.0.45
159170 Properties :
171+ AccessibleLabel : =$"button close notification {ThisItem.Title}"
160172 Appearance : ='ButtonCanvas.Appearance'.Subtle
161173 BasePaletteColor : =ColorValue(Switch(ThisItem.Type,NotificationType.Error,NotificationToaster.Theme.ErrorBckgndColor,NotificationType.Information,NotificationToaster.Theme.InformationBckgndColor,NotificationType.Success,NotificationToaster.Theme.SuccessBckgndColor,NotificationType.Warning,NotificationToaster.Theme.WarningBckgndColor,"#ffffff"))
162174 FontColor : =ColorValue(Switch(ThisItem.Type,NotificationType.Error,NotificationToaster.Theme.ErrorTextColor,NotificationType.Information,NotificationToaster.Theme.InformationTextColor,NotificationType.Success,NotificationToaster.Theme.SuccessTextColor,NotificationType.Warning,NotificationToaster.Theme.WarningTextColor,"#ffffff"))
@@ -175,7 +187,7 @@ ComponentDefinitions:
175187 - TimerDeleteNotification :
176188 Control : Timer@2.1.0
177189 Properties :
178- AutoStart : =true
190+ AutoStart : =Parent.Timer
179191 Duration : |-
180192 =With({FirstNotif:First(colNotifications)},
181193 Coalesce(
@@ -187,10 +199,11 @@ ComponentDefinitions:
187199 =Remove(colNotifications,First(colNotifications));
188200 Set(vRemoveNotif,Blank()) // To avoid timer from keeping last item value
189201 OnTimerStart : =UpdateIf(colNotifications,ID=Blank(),{ID:Max(colNotifications,ID)+1})
190- Repeat : =true
202+ Repeat : =Parent.Timer
191203 Reset : =//CountIf(colNotifications,ID=Blank())>0 || CountIf(colNotifications,ID=Blank())=0
192204 Start : =true
193205 TabIndex : =-1
206+ Visible : =false
194207 Y : =-50
195208 - Admin_ButtonRandomNotification :
196209 Control : Classic/Button@2.2.0
@@ -215,3 +228,13 @@ ComponentDefinitions:
215228 Text : ="Clear"
216229 X : =385
217230 Y : =-50
231+ - Accessible content :
232+ Control : Label@2.5.1
233+ Properties :
234+ Live : =Live.Assertive
235+ Size : =10
236+ Text : |-
237+ =If(!IsBlank(Last(colNotifications)),"New notification :"&Last(colNotifications).Title&".
238+ "&Last(colNotifications).Text)
239+ X : =10
240+ Y : =-100
0 commit comments