Skip to content

Commit 9b1586f

Browse files
author
Kurt Medley
committed
Breaking up aria message
1 parent 8b7e5b4 commit 9b1586f

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/components/filmstrip/CdrFilmstripEngine.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ const announceFrames = useDebounceFn(() => {
235235
*/
236236
const handleFocusIn = (e: FocusEvent) => {
237237
const currentTarget = e.currentTarget as HTMLElement;
238+
238239
if (
239240
!currentTarget ||
240241
!e.relatedTarget ||
@@ -244,10 +245,14 @@ const handleFocusIn = (e: FocusEvent) => {
244245
const start = Math.max(1, currentIndex.value + 1);
245246
const end = Math.min(totalFrames, start + props.framesToShow - 1);
246247
247-
ariaMessage.value =
248-
props.framesToShow === 1
249-
? `Showing frame ${start} of ${totalFrames}. Use left and right arrow keys to navigate.`
250-
: `Showing frames ${start} through ${end} of ${totalFrames}. Use left and right arrow keys to navigate.`;
248+
if (props.framesToShow === 1) {
249+
ariaMessage.value =
250+
`Showing frame ${start} of ${totalFrames}. ` + `Use left and right arrow keys to navigate.`;
251+
} else {
252+
ariaMessage.value =
253+
`Showing frames ${start} through ${end} of ${totalFrames}. ` +
254+
`Use left and right arrow keys to navigate.`;
255+
}
251256
252257
emit('ariaMessage', ariaMessage.value);
253258
}

0 commit comments

Comments
 (0)