From b839978de3ef1b2ea20633d62264936f8b496290 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 5 Jul 2023 14:23:46 +0100 Subject: [PATCH 01/21] alter error state message Fixes https://github.com/github/accessibility-audits/issues/4818 --- examples/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/index.html b/examples/index.html index 5818f59..d07c1e3 100644 --- a/examples/index.html +++ b/examples/index.html @@ -73,9 +73,9 @@

Form that has custom validity messages

form.addEventListener('auto-check-error', event => { if (form.id === 'custom') { const {setValidity} = event.detail - setValidity('🚫 Something went wrong.') + setValidity('🚫 Something went wrong. Please try again') } - state.textContent = 'error' + state.textContent = 'something went wrong, please try again' }) form.addEventListener('auto-check-complete', () => { if (state.textContent === 'loading') state.textContent = '' From a870f3c6af50d3a87de3c34737797916a4776629 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 6 Jul 2023 11:18:37 +0100 Subject: [PATCH 02/21] add aria-atomic/aria-describedby in example --- examples/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/index.html b/examples/index.html index d07c1e3..480e427 100644 --- a/examples/index.html +++ b/examples/index.html @@ -19,8 +19,8 @@

Simple form

- - + + @@ -33,8 +33,8 @@

Form that has custom validity messages

- - + + From ad8b7cfc792de6d018d0ff757da764f4c5fbeb50 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 9 Aug 2023 16:42:29 +0100 Subject: [PATCH 03/21] fix markup in example --- examples/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/index.html b/examples/index.html index 480e427..a422549 100644 --- a/examples/index.html +++ b/examples/index.html @@ -19,8 +19,8 @@

Simple form

- - + +

@@ -33,8 +33,8 @@

Form that has custom validity messages

- - + +

From 07a20ae7292ba17b2290ca8e30366731e8414b44 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 9 Aug 2023 16:52:01 +0100 Subject: [PATCH 04/21] focus form success messages upon submission --- examples/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/index.html b/examples/index.html index a422549..3646f55 100644 --- a/examples/index.html +++ b/examples/index.html @@ -13,7 +13,7 @@

auto-check-element

Simple form

Input 422 for an error response.

- +

All fields marked with * are required

@@ -27,7 +27,7 @@

Simple form

Form that has custom validity messages

Input 422 for an error response.

- +

All fields marked with * are required

@@ -42,7 +42,10 @@

Form that has custom validity messages