From 2ae6ed73cd4575411c5f20dbf1b2e01b3cfedc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Sun, 20 Nov 2022 15:33:22 +0300 Subject: [PATCH 1/5] Improve dataView implementation for accessibility --- src/components/config/PrimeVue.js | 11 +++++++- src/components/dataview/DataView.vue | 13 +++++++++- src/views/dataview/DataViewDoc.vue | 38 +++++++++++++++++++++++++++- src/views/locale/LocaleDemo.vue | 11 +++++++- 4 files changed, 69 insertions(+), 4 deletions(-) diff --git a/src/components/config/PrimeVue.js b/src/components/config/PrimeVue.js index 4feb47d8c1..0cd1b98ab9 100644 --- a/src/components/config/PrimeVue.js +++ b/src/components/config/PrimeVue.js @@ -81,7 +81,16 @@ const defaultOptions = { previous: 'Previous', next: 'Next', navigation: 'Navigation', - scrollTop: 'Scroll Top' + scrollTop: 'Scroll Top', + pageLabel: 'Page', + firstPageLabel: 'First Page', + lastPageLabel: 'Last Page', + nextPageLabel: 'Next Page', + rowsPerPageDropdownLabel: 'Rows per page', + previousPageLabel: 'Previous Page', + jumpToPageLabel: 'Jump to Page', + listView: 'List View', + gridView: 'Grid View' } }, filterMatchModeOptions: { diff --git a/src/components/dataview/DataView.vue b/src/components/dataview/DataView.vue index 1f243213e7..4551ab8e18 100755 --- a/src/components/dataview/DataView.vue +++ b/src/components/dataview/DataView.vue @@ -1,5 +1,5 @@ ` + }, + global: { + plugins: [PrimeVue] } }); From 2e8752da7b43630a645efea347c5e1fbe46bd40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Thu, 24 Nov 2022 14:05:51 +0300 Subject: [PATCH 3/5] Code review fixes --- src/components/dataview/DataView.spec.js | 3 ++- src/components/dataview/DataView.vue | 13 +------------ .../DataViewLayoutOptions.spec.js | 15 +++++++++++++-- .../DataViewLayoutOptions.vue | 10 ++++++++-- src/views/dataview/DataViewDoc.vue | 4 ++-- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/components/dataview/DataView.spec.js b/src/components/dataview/DataView.spec.js index 1b06e3181f..8598d6039c 100644 --- a/src/components/dataview/DataView.spec.js +++ b/src/components/dataview/DataView.spec.js @@ -1,7 +1,8 @@ import { mount } from '@vue/test-utils'; import PrimeVue from 'primevue/config'; import DataView from './DataView.vue'; -import PrimeVue from 'primevue/config'; + + describe('DataView.vue', () => { it('should exist', () => { const wrapper = mount(DataView, { diff --git a/src/components/dataview/DataView.vue b/src/components/dataview/DataView.vue index 4551ab8e18..1f243213e7 100755 --- a/src/components/dataview/DataView.vue +++ b/src/components/dataview/DataView.vue @@ -1,5 +1,5 @@