aboutsummaryrefslogtreecommitdiff
path: root/src/components/screen_reader_notice/screen_reader_notice.js
blob: 3b8eaf3721b3712790611e428a06f776ae9dace9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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