From 2b91d1d5242aba5c609c35717c75daa4909d1819 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 6 Oct 2021 14:21:41 +0100 Subject: [PATCH] Fix mis-spelling of aria-describedby This is currently spelt incorrectly though it seemed to work nonetheless. Can only assume this is a common error, for this attribute or all attribute names, so browsers work it out. This makes the spelling match the spec: https://www.w3.org/TR/wai-aria/#aria-describedby --- app/assets/javascripts/updateStatus.js | 6 +++--- tests/javascripts/updateStatus.test.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/updateStatus.js b/app/assets/javascripts/updateStatus.js index d39e232be..b02ae1690 100644 --- a/app/assets/javascripts/updateStatus.js +++ b/app/assets/javascripts/updateStatus.js @@ -49,11 +49,11 @@ this.$textbox .attr( - 'aria-described-by', + 'aria-describedby', ( - this.$textbox.attr('aria-described-by') || '' + this.$textbox.attr('aria-describedby') || '' ) + ( - this.$textbox.attr('aria-described-by') ? ' ' : '' + this.$textbox.attr('aria-describedby') ? ' ' : '' ) + id ) .on('input', throttle(this.update, 150)) diff --git a/tests/javascripts/updateStatus.test.js b/tests/javascripts/updateStatus.test.js index a626d1fdb..5966f40e7 100644 --- a/tests/javascripts/updateStatus.test.js +++ b/tests/javascripts/updateStatus.test.js @@ -46,7 +46,7 @@ describe('Update content', () => {