From 090a852fd0d8b5e1b6062614a4197dbcb6d06a92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Jacob?= <bjoern.jacob@tritum.de>
Date: Thu, 17 May 2018 13:35:51 +0200
Subject: [PATCH] [TASK] Make honeypot field accessible

The honeypot field now passes the accessibility tests WCAG 2.0 (tested
with Google Lighthouse).

Instead of inserting a label tag or a title attribute - which would be
counterproductive by revealing the purpose of the honeypot - the patch
adds an aria-hidden attribute.

Resolves: #75591
Releases: master, 8.7
Change-Id: Ie4b0b7a245f5c0edf3e01ece60dcb638b2f9bdc1
Reviewed-on: https://review.typo3.org/56992
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
---
 ...ant-75591-PartialsHoneypothtmlHasChanged.rst | 17 +++++++++++++++++
 .../Private/Frontend/Partials/Honeypot.html     |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/8.7.x/Important-75591-PartialsHoneypothtmlHasChanged.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/8.7.x/Important-75591-PartialsHoneypothtmlHasChanged.rst b/typo3/sysext/core/Documentation/Changelog/8.7.x/Important-75591-PartialsHoneypothtmlHasChanged.rst
new file mode 100644
index 000000000000..51321265a467
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/8.7.x/Important-75591-PartialsHoneypothtmlHasChanged.rst
@@ -0,0 +1,17 @@
+.. include:: ../../Includes.txt
+
+======================================================
+Important: #75591 - Partials/Honeypot.html has changed
+======================================================
+
+See :issue:`75591`
+
+Description
+===========
+
+The partial :file:`EXT:form/Resources/Private/Frontend/Partials/Honeypot.html` has been changed. The
+honeypot field now passes the accessibility tests WCAG 2.0 by adding an aria-hidden attribute.
+All installations with the overwritten partial :file:`EXT:form/Resources/Private/Frontend/Partials/Honeypot.html`
+are affected and should be migrated.
+
+.. index:: Frontend, ext:form
diff --git a/typo3/sysext/form/Resources/Private/Frontend/Partials/Honeypot.html b/typo3/sysext/form/Resources/Private/Frontend/Partials/Honeypot.html
index 8272bbdfd9ba..40927ed9aebb 100644
--- a/typo3/sysext/form/Resources/Private/Frontend/Partials/Honeypot.html
+++ b/typo3/sysext/form/Resources/Private/Frontend/Partials/Honeypot.html
@@ -4,7 +4,7 @@
 		<f:form.hidden property="{element.identifier}" id="{element.uniqueIdentifier}" additionalAttributes="{autocomplete: 'off'}" />
 	</f:then>
 	<f:else>
-		<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" additionalAttributes="{autocomplete: 'off'}" tabindex="-1" style="{element.properties.styleAttribute}" />
+		<f:form.textfield property="{element.identifier}" id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" additionalAttributes="{autocomplete: 'off', aria-hidden: 'true'}" tabindex="-1" style="{element.properties.styleAttribute}" />
 	</f:else>
 </f:if>
 </html>
-- 
GitLab