[TASK] Make honeypot field accessible 92/56992/5
authorBjörn Jacob <bjoern.jacob@tritum.de>
Thu, 17 May 2018 11:35:51 +0000 (13:35 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Thu, 17 May 2018 14:03:22 +0000 (16:03 +0200)
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>
typo3/sysext/core/Documentation/Changelog/8.7.x/Important-75591-PartialsHoneypothtmlHasChanged.rst [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Frontend/Partials/Honeypot.html

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 (file)
index 0000000..5132126
--- /dev/null
@@ -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
index 8272bbd..40927ed 100644 (file)
@@ -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>