form label descriptive: Tweak the examples#1826
Merged
WilcoFiers merged 2 commits intodevelopfrom May 16, 2022
Merged
Conversation
Jym77
approved these changes
Apr 7, 2022
Comment on lines
220
to
224
| <html lang="en"> | ||
| <div id="shipping">Shipping address</div> | ||
| <div id="shipping">Shipping</div> | ||
| <span id="name" style="display: none">Name</span> | ||
| <input id="shipping-name" type="text" name="name" aria-labelledby="shipping name" /> | ||
| </html> |
Collaborator
There was a problem hiding this comment.
Maybe the way to make this example better is by adding another field to create the confusion:
<html lang="en">
<div id="shipping">Shipping</div>
<span id="name" style="display: none">Name</span>
<input id="shipping-name" type="text" name="name" aria-labelledby="shipping name" />
<span id="address" style="display: none">Address</span>
<input id="shipping-address" type="text" name="address" aria-labelledby="shipping address" />
</html>Now, it is clear that both input have the same visible context ("Shipping") which is not descriptive enough, even though the programmatic context (accessible names) are good enough.
HelenBurge
approved these changes
Apr 7, 2022
wcreedle
approved these changes
Apr 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Particularly failed example 5 I think is a little more difficult than it needs to be. If I encounter a form field that has a label above it saying "shipping address" I think the logical conclusion there is that it's an address field. That there's a hidden "name" field also makes this a little more confusing. By just using "shipping", it's clearer that information is missing.
Alternatively, or maybe additionally, we could add a second field with a hidden label to failed example 5?
Need for Call for Review: 1 week
How to Review And Approve