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

api.Element.name entry doesn't make sense as used on MDN #6683

Closed
foolip opened this issue Sep 14, 2020 · 14 comments · Fixed by #14481
Closed

api.Element.name entry doesn't make sense as used on MDN #6683

foolip opened this issue Sep 14, 2020 · 14 comments · Fixed by #14481
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@foolip
Copy link
Contributor

foolip commented Sep 14, 2020

https://developer.mozilla.org/en-US/docs/Web/API/Element/name says:

name gets or sets the name property of an element in the DOM. It only applies to the following elements: <a>, <applet>, <button>, <form>, <frame>, <iframe>, <img>, <input>, <map>, <meta>, <object>, <param>, <select>, and <textarea>.

Note: The name property doesn't exist for other elements; unlike tagName and nodeName, it is not a property of the Node, Element or HTMLElement interfaces.

https://developer.mozilla.org/en-US/docs/Web/API/Element/name#Browser_compatibility however is not a useful table for this page, because BCD correctly reflects that there's no name attribute on Element in any browser.

@ddbeck how should one handle a case like this? Should the MDN page instead link to the tables for the elements that do support it?

@queengooborg queengooborg added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 14, 2020
@ddbeck
Copy link
Collaborator

ddbeck commented Sep 14, 2020

Yeah, this is super weird. There isn't an Element.name attribute, but there is an HTMLFormElement.name and HTMLImageElement.name and so on.

And looking at the history of the page, @sideshowbarker's comment on the most recent edit is probably right:

The Element interface actually has no 'name' attribute (this entire article should be deleted…)

My hunch is that we should make a brief check to make sure there was no historic Element.name (e.g., that some previous DOM spec doesn't contain that attribute).

If it did exist, then we could slap a deprecation notice on the page and refer people to the list of individual HTML*Element.name pages (example).

If not, then we could archive the page and drop the Element.name data from BCD.

@saschanaz
Copy link
Contributor

saschanaz commented Sep 19, 2020

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 21, 2020

Thanks for checking that, @saschanaz.

My earlier suggestion was slightly incomplete. Here are the steps to fix this:

  • Archive Element.name page
  • Drop the feature api.Element.name as irrelevant
  • Add features for the real api.HTML*Element.name attributes

@foolip
Copy link
Contributor Author

foolip commented Sep 22, 2020

Thanks @ddbeck, that sounds great! Will you check back here when the page has been archived? I can try to do points 2 and 3 from your list.

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 22, 2020

@foolip Yes, I'll update this issue as soon as I've archived the page. 👍

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 22, 2020

@foolip OK, on the advice of @chrisdavidmills, I redirected the page to https://developer.mozilla.org/en-US/docs/Web/API (instead of archiving or deleting). We're now good to drop api.Element.name from BCD

foolip added a commit to foolip/browser-compat-data that referenced this issue Sep 22, 2020
@foolip
Copy link
Contributor Author

foolip commented Sep 22, 2020

I've sent #6751 to remove the api.Element.name as irrelevant.

Here are the 17 HTML element interfaces that have name attributes in the HTML spec's IDL:

The name entry exists on most but not all of these, and there are other consistency problems to work through, like whether they should be marked deprecated or not.

sideshowbarker pushed a commit that referenced this issue Sep 23, 2020
@queengooborg
Copy link
Contributor

It looks like we have name property BCD entries for all 17 of these APIs! I guess all that's left is to ensure the statuses for these features are consistent, correct?

@foolip
Copy link
Contributor Author

foolip commented Jan 7, 2022

@queengooborg that sounds like a good idea! The entries on HTMLAnchorElement, HTMLEmbedElement, HTMLFrameElement and HTMLImageElement are now set as deprecated, but the rest aren't. I doubt that's right.

@foolip
Copy link
Contributor Author

foolip commented Jan 13, 2022

@queengooborg #14481 only fixed the standards_track status, not the deprecated statuses.

@queengooborg
Copy link
Contributor

Which ones are still inconsistent? @ddbeck reviewed the PR and mentioned that four of the APIs are deprecated so the subfeature should also be deprecated.

@foolip
Copy link
Contributor Author

foolip commented Jan 20, 2022

@queengooborg it's deprecated on HTMLAnchorElement and HTMLImageElement even though the parent features aren't.

@queengooborg
Copy link
Contributor

Daniel had noticed that the name property was put into the "obsolete" section of the spec for these two interfaces, see #14481 (comment) and #14481 (comment).

@foolip
Copy link
Contributor Author

foolip commented Feb 1, 2022

OK, no mistake then. Sorry :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants