Form errors point at elements that do not exist, so nothing announces them #114
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was measured
A company form submitted with an empty name, then every
aria-describedbyon the pageresolved against every
idon the page:Four references, four dangling. Every one.
Why
Django renders the widget, and Django is doing the right thing:
Postulo's own field partial then renders the help and the error without the ids the input
points at:
So the field announces I am invalid, and I am described by two elements -- and neither
element exists. A screen reader gives the invalid state and then has nothing to read. The
error is on the page, in red, two lines down, and unreachable programmatically.
108 uses across 34 templates. Every form Postulo draws itself.
The part that makes it tier 1
The application already knows how to do this.
allauth/elements/fields.htmlsays so in acomment of its own:
So allauth's pages -- sign-in, password, email -- are correct, and Postulo's own are not.
Half the application honours the promise and half breaks it, which is worse than a
consistent omission: somebody testing the sign-in flow with a screen reader would conclude
the application was fine.
It is SC 1.3.1 Info and Relationships and SC 3.3.1 Error Identification, both level
A -- below the AA the README commits to.
Why axe passes
axe cannot know that a
<p>two lines below an input was meant to describe it, and it doesnot report a dangling
aria-describedby. This needed the ids resolved against the document,which is four lines and is the check worth keeping afterwards.
The likely fix, not done here
Give the two paragraphs the ids Django already expects --
{{ field.auto_id }}_helptextand{{ field.auto_id }}_error-- inpartials/field.html, and check the other partials thatdraw fields by hand. The error paragraph probably also wants
role="alert", as allauth'sdoes, so it is announced when the page comes back rather than when somebody happens upon it.
Classification
Accessibility, bug. Tier 1: a stated commitment broken on every form, and the fix is two
attributes.