aboutsummaryrefslogtreecommitdiff
path: root/src/components/screen_reader_notice/screen_reader_notice.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2023-01-28 23:04:59 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2023-01-28 23:04:59 +0000
commitf229c4a106b574e8a3de38fe06ef84dc11493fad (patch)
tree54e12de554f5203e5b39b69fc8a52f3d54d36653 /src/components/screen_reader_notice/screen_reader_notice.js
parentaf220924723676d79431ab9acc03bd4de082003d (diff)
parent5f12c3ae76b82afd2040f2bcc83bf2eda5c4ff91 (diff)
Merge branch 'from/develop/tusooa/autocomplete-accessibility' into 'develop'
Autocomplete accessibility Closes #1219 See merge request pleroma/pleroma-fe!1771
Diffstat (limited to 'src/components/screen_reader_notice/screen_reader_notice.js')
-rw-r--r--src/components/screen_reader_notice/screen_reader_notice.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/screen_reader_notice/screen_reader_notice.js b/src/components/screen_reader_notice/screen_reader_notice.js
new file mode 100644
index 00000000..3b8eaf37
--- /dev/null
+++ b/src/components/screen_reader_notice/screen_reader_notice.js
@@ -0,0 +1,21 @@
+const ScreenReaderNotice = {
+ props: {
+ ariaLive: {
+ type: String,
+ defualt: 'assertive'
+ }
+ },
+ data () {
+ return {
+ currentText: ''
+ }
+ },
+ methods: {
+ announce (text) {
+ this.currentText = text
+ setTimeout(() => { this.currentText = '' }, 1000)
+ }
+ }
+}
+
+export default ScreenReaderNotice