-
Notifications
You must be signed in to change notification settings - Fork 92
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
Write "represents" guideline for HTML elements #1521
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,6 +180,15 @@ Avoid, especially with gerunds. | |
For example, prefer the "The feature writes to…" over "The feature provides writing to…." | ||
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491)) | ||
|
||
##### represents | ||
|
||
If an HTML element or other type doesn't obviously do anything, then it probably _represents_ something. | ||
Use _represents_ as a default for describing the behavior of HTML elements when no more specific verb makes sense. | ||
|
||
- 👍 Recommended: The `<html>` element represents the top level of an HTML document… | ||
- 👍 Recommended: The `<br>` element breaks lines in text. | ||
- 👎 Not recommended: The `<br>` element represents a line break in text. | ||
|
||
Comment on lines
+186
to
+191
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New elaboration on the "represents" guidance There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I would have used "represents" for the Thinking how it would compare to
|
||
##### sets | ||
|
||
Prefer this over multisyllabic alternatives, such as "defines", "determines", or "specifies". | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really like to see a Good/Bad example here. I'm still struggling with this one a bunch, and having a couple of examples would help a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to think of bad examples, rather I'd treat "represents" as a default for HTML elements which we diverge from when we think some other verb is clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @foolip captured my meaning here, as using it as a default. That said, I was able to come up with some examples, so I added them. This necessitated some edits to actual descriptions, of course.