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

Use of "attribute" confusing/ambiguous #457

Closed
jakearchibald opened this issue Nov 30, 2023 · 4 comments · Fixed by #485
Closed

Use of "attribute" confusing/ambiguous #457

jakearchibald opened this issue Nov 30, 2023 · 4 comments · Fixed by #485
Assignees
Labels
Agenda+ editorial Status: Consensus to write We have TAG consensus about the principle but someone needs to write it (see "To Write" project)
Projects

Comments

@jakearchibald
Copy link
Contributor

https://w3ctag.github.io/design-principles/#attribute-reuse - in this section, 'attribute' means DOM attribute

https://w3ctag.github.io/design-principles/#attributes-vs-methods - in this section, 'attribute' mean IDL attribute.

It feels like this could be less confusing somehow.

@torgo torgo added this to the 2023-12-04-week milestone Dec 3, 2023
@torgo torgo added the Agenda+ label Dec 3, 2023
@LeaVerou
Copy link
Member

Two ways forward here:

  1. Be explicit each time and use "DOM attribute" or "IDL attribute" everywhere.
  2. Use "attribute" to mean "DOM attribute" and JS-centric terms ("property" or "accessor" depending on the case) to refer to IDL attributes ( basically what Make 6.1 more inclusive of non-Web JS APIs #435 was trying to do)

@hober has expressed a strong preference for 1 and strong opposition to 2, so it may be the path of least resistance to just go with 1 which at least resolves the inconsistency.

@bkardell
Copy link

I think I agree with a preference for 1. If you look for example at all of the text in https://w3ctag.github.io/design-principles/#attributes-vs-methods - it really seems clearer.

@torgo torgo modified the milestones: 2023-12-04-week, 2024-03-04-week Mar 3, 2024
@plinss plinss added the Status: Consensus to write We have TAG consensus about the principle but someone needs to write it (see "To Write" project) label Mar 5, 2024
@plinss
Copy link
Member

plinss commented Mar 5, 2024

Discussed in breakout and agreed to use option 1. @hober to write a PR.

@martinthomson
Copy link
Contributor

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects uses the word "property". I understand that IDL uses "attribute", but we aren't really talking about IDL as much as we are talking about the objects that are described using IDL.

"Use attributes or methods appropriately" -> "Properties and getters should behave like properties not methods".

@martinthomson martinthomson linked a pull request Apr 1, 2024 that will close this issue
@torgo torgo modified the milestones: 2024-04-01-week, 2024-06-03-week Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ editorial Status: Consensus to write We have TAG consensus about the principle but someone needs to write it (see "To Write" project)
Projects
To Write
Awaiting triage
Development

Successfully merging a pull request may close this issue.

7 participants