Skip to content

Commit 716a1c2

Browse files
committed
48: Accessibility - Count down remaining characters/text.
1 parent c89ff02 commit 716a1c2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

textcounter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
var counterText = base.options.countDown ? base.options.countDownText : base.options.counterText,
2626
counterNum = base.options.countDown ? base.options.max : 0,
2727
$formatted_counter_text = $('<div/>').addClass(base.options.textCountMessageClass)
28+
.attr('aria-live', 'assertive').attr('aria-atomic', 'true')
2829
.html(counterText.replace('%d', '<span class="' + base.options.textCountClass + '">' + counterNum + '</span>')),
2930
$count_overflow_text = $('<div/>').addClass(base.options.countOverflowContainerClass);
3031

0 commit comments

Comments
 (0)