#32490 closed defect (bug) (fixed)
New user: spacing could be increased about input field
Reported by: | karmatosed | Owned by: | helen |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Users | Keywords: | |
Focuses: | ui | Cc: |
Attachments (7)
Change History (24)
This ticket was mentioned in Slack in #accessibility by helen. View the logs.
9 years ago
#3
@
9 years ago
As with any error message, the real problem here is that the error is only being conveyed with color. The fact that the color is below contrast guidelines when contrasted with the background is significantly less important than the lack of an error indicator that isn't purely based on color. For a screen reader user, for example, this is completely meaningless, regardless of the color used.
There should be included text that indicates that there's an error and explicitly describes it, e.g. "Error: Email is required". With that included, the color doesn't actually matter - it's a purely supplemental indicator, rather than the sole indicator.
Caveat: I didn't check whether this indicator includes hidden screen reader text. If it does, then that's fine for users of screen readers, but still a problem for people with other vision impairments.
#4
@
9 years ago
Right now, that particular error is just a class added by JS when it detects an empty required field, so purely visual changes. From what I can tell, this can be leveraged by plugins. I'm not sure what we can do more generally along the lines of more text.
#5
@
9 years ago
Noticed only the first required field has an aria-required="true"
attribute. Maybe worth considering to add it to the other fields too.
For the visual indicator, maybe we could try some simple CSS. Tried a very basic thing and got this:
.form-required label:after { content: '\f158'; float: right; font: normal 20px/1 dashicons; color: #c00; vertical-align: middle; visibility: hidden; } .form-invalid label:after { visibility: visible; }
The position of the "X" could be tweaked a bit, it's just a basic try.
For the text part, this is a basic JavaScript client side validation and maybe the tricky part would be about translatable string but probably something could be done along the lines of wpAjax.invalidateForm
where we have a jQuery collection of the invalid fields.
This ticket was mentioned in Slack in #design by liljimmi. View the logs.
9 years ago
@
9 years ago
( ! ) Dashicon for error messaging inside fields. Replaced red with @hugobaeta's red. Note: this patch relies on new 4.3 Dashicons
This ticket was mentioned in Slack in #design by liljimmi. View the logs.
9 years ago
#12
@
9 years ago
- Owner set to helen
- Resolution set to fixed
- Status changed from new to closed
In 33109:
#13
@
9 years ago
A note for the future that this is JS-only right now, maybe in the future of a more unified fields API we could do it server-side, too. :)
#14
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 4.3
#16
follow-up:
↓ 17
@
9 years ago
- Keywords needs-screenshots removed
Screenshots are in the ticket description and comment 9.
We looked at the pale pink background color in an accessibility tool and it did not provide enough contrast to be helpful. I removed the background and added a red shadow for emphasis.