From 0b01558dc32a424e8c60a24f4e48e97d1a0dd4f0 Mon Sep 17 00:00:00 2001 From: Koen Van Geert Date: Wed, 27 Nov 2024 17:45:55 +0100 Subject: [PATCH] Accessibility: change page navigation buttons from div to button element --- .../page-navigator-item.component.html | 4 ++-- .../page-navigator/page-navigator.component.html | 4 ++-- .../page-navigator/page-navigator-item.scss | 3 +++ .../src/page-navigator/page-navigator-item.html | 13 +++++++++---- .../src/page-navigator/page-navigator.html | 4 ++-- packages/survey-creator-react/src/PageNavigator.tsx | 10 +++++----- .../src/page-navigator/PageNavigator.vue | 4 ++-- .../src/page-navigator/PageNavigatorItem.vue | 4 ++-- 8 files changed, 27 insertions(+), 19 deletions(-) diff --git a/packages/survey-creator-angular/src/page-navigator/page-navigator-item.component.html b/packages/survey-creator-angular/src/page-navigator/page-navigator-item.component.html index 224b90dc6b..cace44f159 100644 --- a/packages/survey-creator-angular/src/page-navigator/page-navigator-item.component.html +++ b/packages/survey-creator-angular/src/page-navigator/page-navigator-item.component.html @@ -1,6 +1,6 @@
-
@@ -9,6 +9,6 @@ {{ model.title }}
-
+
\ No newline at end of file diff --git a/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html b/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html index f670d44207..4471b6fa33 100644 --- a/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html +++ b/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html @@ -1,10 +1,10 @@
-
-
+
diff --git a/packages/survey-creator-core/src/components/page-navigator/page-navigator-item.scss b/packages/survey-creator-core/src/components/page-navigator/page-navigator-item.scss index 5846b60cd6..9b11d2c74e 100644 --- a/packages/survey-creator-core/src/components/page-navigator/page-navigator-item.scss +++ b/packages/survey-creator-core/src/components/page-navigator/page-navigator-item.scss @@ -11,6 +11,9 @@ svc-page-navigator-item, } .svc-page-navigator-item-content { + border: none; + appearance: none; + background: none; height: 100%; width: 100%; diff --git a/packages/survey-creator-knockout/src/page-navigator/page-navigator-item.html b/packages/survey-creator-knockout/src/page-navigator/page-navigator-item.html index 4cf8abd8b3..07df5096ab 100644 --- a/packages/survey-creator-knockout/src/page-navigator/page-navigator-item.html +++ b/packages/survey-creator-knockout/src/page-navigator/page-navigator-item.html @@ -1,9 +1,14 @@ -
-
+
\ No newline at end of file + diff --git a/packages/survey-creator-knockout/src/page-navigator/page-navigator.html b/packages/survey-creator-knockout/src/page-navigator/page-navigator.html index 0b1c948ebf..b7eef46945 100644 --- a/packages/survey-creator-knockout/src/page-navigator/page-navigator.html +++ b/packages/survey-creator-knockout/src/page-navigator/page-navigator.html @@ -1,10 +1,10 @@
-
-
+
diff --git a/packages/survey-creator-react/src/PageNavigator.tsx b/packages/survey-creator-react/src/PageNavigator.tsx index d4a3d6b8df..18930ee6b6 100644 --- a/packages/survey-creator-react/src/PageNavigator.tsx +++ b/packages/survey-creator-react/src/PageNavigator.tsx @@ -57,7 +57,7 @@ export class SurveyPageNavigator extends CreatorModelElement< const el = this.containerRef.current as HTMLDivElement; if (!!el) { const self = this; - el.parentElement.parentElement.parentElement.onscroll = function (this: GlobalEventHandlers, ev: Event) { + el.parentElement.parentElement.parentElement.onscroll = function(this: GlobalEventHandlers, ev: Event) { return self.model.onContainerScroll(ev.currentTarget as HTMLDivElement); }; self.model.setItemsContainer(el.parentElement as HTMLDivElement); @@ -80,7 +80,7 @@ export class SurveyPageNavigator extends CreatorModelElement< className += " svc-page-navigator__button--pressed"; return (
- {attachKey2click(
this.model.togglePageSelector()} title={this.model.pageSelectorCaption} @@ -96,7 +96,7 @@ export class SurveyPageNavigator extends CreatorModelElement< model={this.model.popupModel} //className="svc-page-navigator__popup" > -
)} + )}
{this.model.visibleItems.map((item) => ( { } return (
- {attachKey2click(
{ item.action(item); @@ -136,7 +136,7 @@ export class SurveyPageNavigatorItem extends CreatorModelElement { {item.title}
-
)} + )}
); } diff --git a/packages/survey-creator-vue/src/page-navigator/PageNavigator.vue b/packages/survey-creator-vue/src/page-navigator/PageNavigator.vue index 3d35c326a3..2d2939a168 100644 --- a/packages/survey-creator-vue/src/page-navigator/PageNavigator.vue +++ b/packages/survey-creator-vue/src/page-navigator/PageNavigator.vue @@ -1,6 +1,6 @@