Skip to content

Commit 28779b8

Browse files
committed
feat: Adding live region to announce the change in pop-up view
1 parent 2e1394f commit 28779b8

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/components/PopupBody.vue

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
/>
1212
<PopupBodyNoIssues v-if="!results.issuesFound && !details" />
1313
<PopupLoading v-show="loading" />
14+
<span
15+
class="va-sr-only"
16+
aria-live="polite"
17+
>
18+
{{ details ? $vat('announcer_details_view') : $vat('announcer_violations_view') }}
19+
</span>
1420
</div>
1521
</template>
1622

src/locales/en.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ export default {
44
btn_label: 'accessibility issue found',
55
btn_label_plu: 'accessibility issues found',
66
fix: 'Fix the following',
7-
fixes: 'Fix any of the following'
7+
fixes: 'Fix any of the following',
8+
announcer_details_view: 'Details os violation has loaded',
9+
announcer_violations_view: 'List of violations has loaded'
810
}

src/locales/pt_BR.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ export default {
2424
serious: 'Importante',
2525
moderate: 'Moderado',
2626
minor: 'Leve',
27-
els: 'Elementos'
27+
els: 'Elementos',
28+
details: 'Detalhes',
29+
announcer_details_view: 'Detalhes da violação foi carregado',
30+
announcer_violations_view: 'Lista de violações foi carregada'
2831
}

0 commit comments

Comments
 (0)