Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form hints (description) should be rendered above the input, not below #2

Open
thomasmassmann opened this issue Dec 18, 2021 · 0 comments
Assignees
Labels
A11Y Accessibility issues enhancement New feature or request

Comments

@thomasmassmann
Copy link
Member

thomasmassmann commented Dec 18, 2021

The default widget template in Plone (implemented in https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/templates/widget.pt) has some accessibility issues:

The current template is based on the Bootstrap 5 markup, and there the hints are below the input, linked with an aria-describedby (https://getbootstrap.com/docs/5.1/forms/overview/#form-text). While the linked information is a good start for screenreader users, it might cause problems for sighted users with complex and longer widgets: if the hint is placed below the input, the information gets disconnected (it is not immediately visible) and might not be recognized and overseen by users. People using a zoomed representation of the form or screen magnifiers, or people with limited visibility might miss the form hint.

Best practices have shown that the form hint should be placed between label and input. See also https://formspree.io/blog/accessible-forms/ (at “2. Use a Clear Visual Label—Not Placeholder Text”).

In his book “Form Design Patterns” Adam Silver also places all form hints for a field above the input:

Form hints above input

@thomasmassmann thomasmassmann added enhancement New feature or request A11Y Accessibility issues labels Dec 18, 2021
@thomasmassmann thomasmassmann self-assigned this Dec 18, 2021
@thomasmassmann thomasmassmann changed the title Increase a11y for widgets Form hints (description) should be rendered above the input, not below Dec 19, 2021
thomasmassmann added a commit that referenced this issue Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11Y Accessibility issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant