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

New convention for form fields with no aria-corresponding attribute. #1000

Open
DavidMacDonald opened this issue Jun 24, 2019 · 7 comments
Open
Labels
Milestone

Comments

@DavidMacDonald
Copy link

DavidMacDonald commented Jun 24, 2019

I'm seeing a new convention on large corporate sites that have purchasing checkouts. The first time I saw it I shrugged it off. But then I saw it on about 3 more large sites. It seems to be an emerging standard pattern.

It's a checkmark to the right of the input field. It is a visual indication that the field has been filled out using an acceptable format. It's not saying that the content provided by the user has been validated.

image

For instance, you could enter a VISA # which is in a correct format and the green check will appear, but could still fail during validation of the card.

aria-invalid might be sufficient, but its coming at the issue from the other side, notifying the user IF the format is bad, and not notifying them if it is good.

I'm currently advising clients to make the green checkmark ignored by AT, and add the appropriate error message and aria-invalid if its not Ok, but I'm a little uneasy with that. I thought about putting alt text on the image that says "acceptable format" but that seems a bit chatty and contrived.

Do we need some sort of attribute or setting that gives a positive validation that the field has been filled out using an acceptable format?

@stes-acc
Copy link

Easy. We need value extension, we need to extend aria-invalid with an enum:
aria-invalid = "error / warning / info" with backward compatibility = "true" which means "error".

We did the same with aria-haspopup.

Then we use other techniques like aria-errormessage to give add. background info. And yes, "errormessage" is semantically not the best if type is warning or info.

@jnurthen jnurthen added this to the ARIA 1.3 milestone Jun 27, 2019
@DavidMacDonald
Copy link
Author

DavidMacDonald commented Jun 28, 2019

@stes-acc
Sure, OK with me

The only little hitch is that these things usually show up while the user is on the field or after they leave it. they'd have to SHIFT+TAB back to see if it was "checked", which might be OK, but worth mulling over.

@stes-acc
Copy link

Using aria-errormessage for this? Where is the respective APG info?

@mcking65
Copy link
Contributor

@DavidMacDonald I am not sure why you are uneasy with your original approach.

It would be good to start with first principles and understand what, if anything, is the visual indicator doing for users. If it is helpful to some users, exactly why and how. Then ask the question if simulating that for AT users via ARIA provides the same value. Or, if you were going to provide the same value to AT users, would it require a completely different approach that would have to be implemented either by the author or screen reader developers. If yes, then what kind of additional ARIA markup would be needed to do that, if any.

My gut is that trying to emulate this with more markup on the field has 0 value to screen reader users. My concern would be that we just add more potentially confusing noise to the experience.

If the idea is scan the page and see if you missed anything, more ARIA markup is unnecessary. In fact, I would argue that current markup is sufficient for screen readers to automatically and intelligently provide this service to users whenever their reading cursor is sitting on a form submit button. Why couldn't a screen reader automatically enhance the submit button with information like 4 required fields are missing values. The screen reader could even list those fields and provide links to them in its context help. We have all the ARIA necessary for a screen reader to do that kind of thing. They just haven't thought about doing it.

@jnurthen
Copy link
Member

jnurthen commented Dec 1, 2020

I think in order to progress this we need to collect examples from around the web and see if there are any cases where this would add value to users.

@MelSumner
Copy link
Contributor

@stes-acc
Sure, OK with me

The only little hitch is that these things usually show up while the user is on the field or after they leave it. they'd have to SHIFT+TAB back to see if it was "checked", which might be OK, but worth mulling over.

I don't think this is necessarily true. If it's positioned with CSS, then the markup would resemble something like https://www.w3.org/WAI/tutorials/forms/notifications/#on-focus-change. What do you think?

@jnurthen
Copy link
Member

jnurthen commented Mar 1, 2021

more use cases needed before progressing.

@jnurthen jnurthen modified the milestones: ARIA 1.3, ARIA 1.4 Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants