Skip to content

form label descriptive: Tweak the examples#1826

Merged
WilcoFiers merged 2 commits intodevelopfrom
form-label-examples
May 16, 2022
Merged

form label descriptive: Tweak the examples#1826
WilcoFiers merged 2 commits intodevelopfrom
form-label-examples

Conversation

@WilcoFiers
Copy link
Copy Markdown
Member

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

  • Go to the “Files changed” tab
  • Here you will have the option to leave comments on different lines.
  • Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
  • Make sure to also review the proposed Call for Review period. In case of disagreement, the longer period wins.

Copy link
Copy Markdown
Collaborator

@Jym77 Jym77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Possible improvement.

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>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@WilcoFiers WilcoFiers added the Review Call 1 week Call for review for small changes label Apr 28, 2022
@WilcoFiers WilcoFiers merged commit 9f6ca37 into develop May 16, 2022
@WilcoFiers WilcoFiers deleted the form-label-examples branch May 16, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review Call 1 week Call for review for small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants