From df462181366da07d8fedb178a5bed1727305699a Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Thu, 10 May 2018 12:07:02 +0000 Subject: [PATCH] Fix automated a11y test error with input - test was rendering a page where it couldn't find the ID being used in the example for the aria-describedby attribute - can't add an arbitrary ID into the page, so now using the id of the main wrapper, which prevents the error occurring - documentation updated to explain this --- CHANGELOG.md | 1 + .../govuk_publishing_components/components/docs/input.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b188b2caa7..02918cfd4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +* Fix automated a11y test error with input (PR #303) * Add an optional `canonical` meta tag (PR #302) * Iterate branding model (PR #300) diff --git a/app/views/govuk_publishing_components/components/docs/input.yml b/app/views/govuk_publishing_components/components/docs/input.yml index 97ca7de6fc..2acf3bbe89 100644 --- a/app/views/govuk_publishing_components/components/docs/input.yml +++ b/app/views/govuk_publishing_components/components/docs/input.yml @@ -32,12 +32,12 @@ examples: description: | Allows the addition of an aria-describedby attribute. Note that this will be overridden in the event of an error, where the error will be used for the describedby attribute value. - The example below uses the ID of the skiplink container for demonstration purposes, in real use this would be passed the ID of an element that correctly described the input. + The example below uses the ID of the main container for demonstration purposes as there aren't any useful elements with IDs in the component guide. In real use this would be passed the ID of an element that correctly described the input. data: label: text: "This might not work" name: "labelledby" - describedby: "skiplink-container" + describedby: "wrapper" with_error: data: label: