@@ -51,6 +51,7 @@ const ActionDataSamplesCard = ({
5151 newRecordingId,
5252 clearNewRecordingId,
5353} : ActionDataSamplesCardProps ) => {
54+ const intl = useIntl ( ) ;
5455 const deleteActionRecording = useStore ( ( s ) => s . deleteActionRecording ) ;
5556 const view = useStore ( ( s ) => s . settings . dataSamplesView ) ;
5657 if ( view === DataSamplesView . GraphAndDataFeatures ) {
@@ -76,6 +77,15 @@ const ActionDataSamplesCard = ({
7677 key = { recording . ID }
7778 >
7879 < CloseButton
80+ aria-label = { intl . formatMessage (
81+ {
82+ id : "delete-recording-aria" ,
83+ } ,
84+ {
85+ sample : value . recordings . length - idx ,
86+ numSamples : value . recordings . length ,
87+ }
88+ ) }
7989 position = "absolute"
8090 top = { - 2 }
8191 right = { - 2 }
@@ -88,6 +98,7 @@ const ActionDataSamplesCard = ({
8898 />
8999 < DataSample
90100 recording = { recording }
101+ numRecordings = { value . recordings . length }
91102 actionId = { value . ID }
92103 recordingIndex = { idx }
93104 isNew = { newRecordingId === recording . ID }
@@ -124,6 +135,7 @@ const ActionDataSamplesCard = ({
124135 actionId = { value . ID }
125136 recordingIndex = { idx }
126137 recording = { recording }
138+ numRecordings = { value . recordings . length }
127139 isNew = { newRecordingId === recording . ID }
128140 onDelete = { deleteActionRecording }
129141 onNewAnimationEnd = { clearNewRecordingId }
@@ -199,7 +211,10 @@ const RecordingArea = ({
199211 < MoreMenuButton
200212 minW = { 8 }
201213 variant = { selected ? "record" : "recordOutline" }
202- aria-label = { intl . formatMessage ( { id : "recording-options-aria" } ) }
214+ aria-label = { intl . formatMessage (
215+ { id : "recording-options-aria" } ,
216+ { action : action . name }
217+ ) }
203218 />
204219 < Portal >
205220 < MenuList >
@@ -271,6 +286,7 @@ const RecordingArea = ({
271286
272287const DataSample = ( {
273288 recording,
289+ numRecordings,
274290 actionId,
275291 recordingIndex,
276292 isNew,
@@ -280,6 +296,7 @@ const DataSample = ({
280296 hasClose = true ,
281297} : {
282298 recording : RecordingData ;
299+ numRecordings : number ;
283300 actionId : number ;
284301 recordingIndex : number ;
285302 isNew : boolean ;
@@ -307,9 +324,15 @@ const DataSample = ({
307324 right = { 0 }
308325 zIndex = { 1 }
309326 size = "sm"
310- aria-label = { intl . formatMessage ( {
311- id : "delete-recording-aria" ,
312- } ) }
327+ aria-label = { intl . formatMessage (
328+ {
329+ id : "delete-recording-aria" ,
330+ } ,
331+ {
332+ sample : numRecordings - recordingIndex ,
333+ numSamples : numRecordings ,
334+ }
335+ ) }
313336 onClick = { handleDelete }
314337 />
315338 ) }
0 commit comments