Skip to content

Conversation

@derhansen
Copy link
Contributor

The configured value new-powermail-hp for the autocomplete attribute is invalid and fails in the accessibility check provided by accessibilityinsights.io

AFAIK, valid values for autofill are:

The configured value `new-powermail-hp` for the autocomplete
attribute is invalid and fails in the accessibility check
provided by accessibilityinsights.io

Valid values for autofill:
https://www.w3.org/TR/html52/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute
@nebrot
Copy link
Contributor

nebrot commented Oct 17, 2019

See #102 for the reason of the current value.

@derhansen
Copy link
Contributor Author

The problem is, that the current value is invalid and resulting in an error in WCAG tests.

TYPO3 core ext:form has those settings (see https://forge.typo3.org/projects/typo3cms-core/repository/revisions/090a852fd0d8b5e1b6062614a4197dbcb6d06a92/diff), which I believe may not resolve the problem Chrome browser has with autocomplete="off".

I'd rather prefer adding a valid value to the autocomplete attribute (e.g. address-level4 like suggested as solution in https://bugs.chromium.org/p/chromium/issues/detail?id=468153#c41).

Any opinions against such a solution?

Added additional attributes to honeypot textfield, so it will be
ignored by screenreaders.
@derhansen
Copy link
Contributor Author

I adapted the PR, so the autocomplete field can still contain an invalid value, but screenreaders will ignore the honeypot field (added aria-hidden="true").

Note, that I also added the form uid to be included in the autocomplete value, since this may reduce the amount of spam (see https://forge.typo3.org/issues/89420)

@derhansen derhansen changed the title [TASK] Remove autocomplete attribute in HoneyPot partial [TASK] Hide honeypot field from screenreaders Nov 23, 2019
@nebrot
Copy link
Contributor

nebrot commented Nov 23, 2019

The prefix "new-" must be still at the beginning. Could you change it to autocomplete: 'new-powermail-hp-{form.uid}'?

@derhansen
Copy link
Contributor Author

The prefix "new-" must be still at the beginning. Could you change it to autocomplete: 'new-powermail-hp-{form.uid}'?

Done

@markusguenther
Copy link

markusguenther commented Sep 7, 2020

@nebrot Hello,

why is the new- prefix needed? Because the screenreader is now not acting with this field anymore, but the field is still invalid. Is there no way to choose a value from this list. It seems the spam protection just checks if the field __hp is empty.

So bot maybe also fill out the valid autocomplete field.

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

@nebrot
Copy link
Contributor

nebrot commented Sep 7, 2020

@nebrot Hello,

why is the new- prefix needed? Because the screenreader is now not acting with this field anymore, but the field is still invalid. Is there no way to choose a value from this list. It seems the spam protection just checks if the field __hp is empty.

So bot maybe also fill out the valid autocomplete field.

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

It's semantic autocomplete to avoid autofilling e.g. in Chrome for Android. See #102 for details and https://stackoverflow.com/a/30873633

@masi
Copy link

masi commented Nov 9, 2020

There are other solutions that pass the validator:

<input autocomplete="section-powermail-hp-<random> pager tel-local-suffix"/>
<input autocomplete="section-powermail-hp-<random> new-password"/>

See https://www.w3.org/TR/html52/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute

@markusguenther
Copy link

Also created a PR to be able to define autocomplete attributes via field properties #620

@sypets
Copy link
Contributor

sypets commented Nov 7, 2022

@derhansen Does this problem still exist? Can you create an issue for it? (Since this has been around a while and is not merged yet, but one cannot find this when searching in the issues tab).

See also my issue, related to honey pot failing, but probably not directly related #824.

@einpraegsam einpraegsam merged commit 727c285 into in2code-de:develop Nov 7, 2022
@einpraegsam
Copy link
Collaborator

Thx for raising this issue again. I just merged it to develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants