You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-95Lines changed: 35 additions & 95 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,17 @@
1
-
# vue-announcer
1
+
# Introduction
2
2
3
-
Imagine browsing pages (routes), receiving alerts and notifications, having a countdown timer on the page, a progress bar or a loading, among others. Now imagine all this happening to people who have visual disabilities and who use screen readers.
3
+
Imagine browsing pages (routes), receiving alerts and notifications, having a countdown timer on the page, a progress bar, a loading or a change of route in a SPA. Now imagine all this happening to people who have visual disabilities and who use screen readers.
4
+
5
+
The [vue-announcer](https://github.com/vue-a11y/vue-announcer) provides an easy way to really tell what’s going on in your application to people using screen readers.
4
6
5
-
The idea of this plugin is to tell the screen reader what is happening and primarily if you use single-page application.
6
7
Inspired by others in the community like:
7
-
https://haltersweb.github.io/Accessibility/spa.html*(Example of how creating an accessible single-page application)*
You can set a property on the meta object, which will serve as information to get the message that will be announced to the screen reader on each page. e.g.:
104
-
```javascript
105
-
{
106
-
name:'home',
107
-
path:'/',
108
-
component: Home,
109
-
meta: {
110
-
announcer:'Página de inicio'
111
-
}
112
-
}
113
-
```
114
-
115
-
When the page loads, the screen reader user will hear:
116
-
```shell
117
-
Página de inicio ha cargado
118
-
```
119
-
120
-
121
-
122
-
**Note:**
123
-
- The plugin checks whether it was defined in the meta object, otherwise, without any problems, the title of the page being loaded will be used.
124
-
- The vue-announcer uses the global after hooks `router.afterEach` to announce the route changes.
63
+
[see more in the documentation](https://announcer.vue-a11y.com/)
Imagine browsing pages (routes), receiving alerts and notifications, having a countdown timer on the page, a progress bar, a loading or a change of route in a SPA. Now imagine all this happening to people who have visual disabilities and who use screen readers.
4
+
5
+
The [vue-announcer](https://github.com/vue-a11y/vue-announcer) provides an easy way to really tell what’s going on in your application to people using screen readers.
6
+
7
+
Inspired by others in the community like:
8
+
-[Example of how creating an accessible single-page application](https://haltersweb.github.io/Accessibility/spa.html)
> Using JavaScript, it is possible to dynamically change parts of a page without requiring the entire page to reload — for instance, to update a list of search results on the fly, or to display a discreet alert or notification which does not require user interaction. While these changes are usually visually apparent to users who can see the page, they may not be obvious to users of assistive technologies. ARIA live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
4
+
--- [ARIA live regions - Accessibility | MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions)
5
+
6
+
## Politeness settings
7
+
8
+
You can use the options `polite`, `assertive` and `off`, if no configuration is defined, the default is `off`.
9
+
10
+
### polite
11
+
It is used in most situations that present new information to users.
12
+
The notification will take place at the next available point, without interruptions.
13
+
14
+
::: tip Note
15
+
In the [vue-announcer plugin](https://github.com/vue-a11y/vue-announcer/blob/master/src/index.js#L8) the default is `polite`
16
+
:::
17
+
18
+
### assertive
19
+
It is used in situations where the notification is important enough to communicate it immediately, for example, error messages or alerts.
0 commit comments