From 3da7c28feedad5c98b805d70a244059bf6035cf8 Mon Sep 17 00:00:00 2001 From: Stian Lund <1493836+Pathduck@users.noreply.github.com> Date: Tue, 8 Aug 2023 19:30:04 +0200 Subject: [PATCH] add spatial-navigation tests --- test/bookmark-title/index.html | 11 ++++ test/index.html | 4 +- test/spatial-navigation/index.html | 85 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100755 test/bookmark-title/index.html create mode 100755 test/spatial-navigation/index.html diff --git a/test/bookmark-title/index.html b/test/bookmark-title/index.html new file mode 100755 index 0000000..a85e50a --- /dev/null +++ b/test/bookmark-title/index.html @@ -0,0 +1,11 @@ + + + This is the HTML title + + + +

Test of HTML title vs og:title in bookmarks

+

Add page as bookmark and look at the title generated.

+ + + \ No newline at end of file diff --git a/test/index.html b/test/index.html index 478958d..04901df 100644 --- a/test/index.html +++ b/test/index.html @@ -29,6 +29,7 @@

test

..
+[   0 Jul 28 10:10]  bookmark-title
[   0 Oct  7  2022]  cache
[   0 Jul 21 15:46]  fastforward
[   0 Jul 14 17:07]  favicon-cors
@@ -43,6 +44,7 @@ [   0 Jul 21 13:28]  preventdefault
[   0 Jul 14 19:33]  referrer
[   0 Jul 14 16:52]  session-storage
+[   0 Aug  8 19:29]  spatial-navigation
[   0 Jul  9  2022]  translate
[   0 Oct  7  2022]  video-mkv-aac
[   0 May  6 20:37]  window-open-crash
@@ -51,7 +53,7 @@

-17 directories, 1 file +19 directories, 1 file

diff --git a/test/spatial-navigation/index.html b/test/spatial-navigation/index.html new file mode 100755 index 0000000..1d394ab --- /dev/null +++ b/test/spatial-navigation/index.html @@ -0,0 +1,85 @@ + + + + Spatial Navigation Test Cases + + +

Spatial Navigation Test Cases

+

Press shift+down (or another shortcut associated with spatnav) repeatedly to navigate through the elements.

+

Expected result: Both links, form fields and other interactive elements are traversable by spatnav.
+ Elements that can consume shift+arrows themselves (e.g. a multiline textarea) should only be prefocused, not focused, + so you can navigate past them without interruption and without changing any values.

+

Link

+

Link

+

+

Input type=text

+

Input type=tel

+

Input type=url

+

Input type=email

+

Input type=password

+

Input type=date

+

Input type=time

+

Input type=number

+

Input type=range

+

Input type=color

+

Input type=checkbox

+

Input type=radio:

+
+ Radio button 1 +
+
+ Radio button 2 +
+
+ Radio button 3 +
+

Input type=file

+

Input type=button

+

An iframe including focusable elements:
+

+
+

A scrollable div.

+

This div contains links.

+

.....

+

.....

+

.....

+

.....

+

.....

+

Also links below the fold that should be scrolled into view with Spatnav.

+
+

+

+

Span with onclick listener. Try to click me by keyboard!

+

Span with tabindex=0.

+

+ This is a div with the draggable attribute and the ondragstart event + listener set (though it doesn't do anything). Only useful if drag-and-drop will be made keyboard accessible in + general (VB-4154). Also consider adding dragenter or dragover listeners to the list of spatnav triggers. +
+
+ This is a drop target for drag-and-drop, declared by the dropzone + attribute and the ondrop event listener (though it doesn't do anything). Only useful if drag-and-drop will be made + keyboard accessible in general (VB-4154). +
+

This is a span with a pointer cursor. It + usually indicates something clickable for mouse users and can be reasonably expected to be interactive. Not included + as a spatnav target in old Opera, but I think it does no harm and may fix a few additional cases where web apps + aren't specifically developed with keyboard accessibility in mind.

+

Link

+ +