-
Notifications
You must be signed in to change notification settings - Fork 46
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
Initial commit for #279. #381
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
968b178
Initial commit for #279.
cynthia c01b283
Update index.bs
cynthia 5d615ec
Update index.bs
cynthia ffc78db
Update index.bs
cynthia 5262dd1
Update index.bs
cynthia 718df66
Merge branch 'main' into cynthia/279
cynthia 357a8da
Added counterpattern examples.
cynthia 253803d
Update index.bs
cynthia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1001,6 +1001,26 @@ Consider adding such features only in cases when the overall user experience is | |
A canonical example of this is blocking rendering in order to download and process a stylesheet. | ||
The alternative user experience is a flash of unstyled content, which is undesirable. | ||
|
||
<h3 id="html-idl-must-by-synced">Keep attributes in sync</h3> | ||
|
||
New content attributes | ||
should have a corresponding IDL attribute with the same name, | ||
and the state between the two should be kept synchronized. | ||
Carving out a synchronized IDL attribute with inconsistent naming | ||
results in confusion, and should be avoided. | ||
|
||
<div class="note"> | ||
This does not hold the other way around. | ||
A new IDL attribute does not always warrant a content attribute counterpart. | ||
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. This needs an example of an IDL attribute that does not correspond to an HTML attribute. |
||
</div> | ||
|
||
<div class="example"> | ||
A counterpattern to this guidance can be found in | ||
<{input}>'s <{input/value}>, <{option}>'s <{option/selected}>, and <{input}>'s <{input/checked}> | ||
where the HTML attributes were never updated | ||
and the IDL attribute was the single source of truth. | ||
</div> | ||
|
||
<h3 id="naming-of-url-attributes">Name URL-containing attributes based on their primary purpose</h3><!-- https://github.com/w3ctag/design-principles/issues/278 --> | ||
|
||
If the element enables the user to navigate to the URL contained in the attribute, call the attribute `href`, like the <{a}> element's <{a/href}> attribute. | ||
|
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.
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.