Skip to content

Documentation for HTML Model element (take 2) #39811

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zachernuk
Copy link

( This is a rebuild of the Model element PR from #39710 )

Preface to the new PR

This branch is a clean rebuild of the substantive content about the HTML Model element from the earlier PR at #39710
where I had alterations to a .lock file. Since I'm not familiar enough with Git to revert one single file in the overall process, I thought it would be best to start fresh. Apologies for the clutter!

Description

This PR adds API documentation about the proposed HTML Model element, a browser-native feature for the in-line display of 3D content. It includes illustrations of some core concepts like perspective, lighting and appropriate file formats.

Motivation

The Model element is a totally new web feature and it'll be exceptionally difficult to add documentation in a piecemeal fashion. I'm hoping that this covers the core concepts enough to author new pages from, and matches the MDN house style well enough that other folks can improve them to the point that they are real!

Additional details

I am submitting provisional documentation for the HTML model element, a feature that is the major source of discussion in the W3C Immersive Web CG (https://github.com/immersive-web/model-element/ )
and which is available as a feature preview in visionOS 2.4. I am an editor of the specification and have been facilitating the discussion around it.

While the specification doesn’t have a lot of detail, the API in visionOS is based on the consensus discussion in the CG, and is described in the Model Element explainer: (https://github.com/immersive-web/model-element/blob/main/explainer.md )

There is also a WebGL/WebXR-based interactive explainer demo available here:
https://immersive-web.github.io/model-element/explainer_demo.html

We also have public samples being contributed by multiple browser vendors in the model element samples repository.
https://immersive-web.github.io/model-element-samples/

We have previously submitted related additions to the WHATWG HTML specification as via an introductory issue and initial PR for the specification stub.
whatwg/html#10901
whatwg/html#11191

Related issues and pull requests

WHATWG/HTML

the Web Platform Tests repository

HTML-ARIA

This branch is a clean rebuild of the substantive content about the `HTML Model element` from the earlier PR at
mdn#39710
where I had alterations to a .lock file.
Since I'm not familiar enough with Git to revert one single file in the overall process, I thought it would be best to start fresh. Apologies for the clutter!
@zachernuk zachernuk requested review from a team as code owners June 5, 2025 21:19
@zachernuk zachernuk requested review from estelle and wbamberg and removed request for a team June 5, 2025 21:19
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/xl [PR only] >1000 LoC changed labels Jun 5, 2025
@zachernuk zachernuk changed the title Proposed documentation for proposed Model element (take 2) Documentation for HTML Model element (take 2) Jun 5, 2025
Copy link
Contributor

github-actions bot commented Jun 5, 2025

Preview URLs (20 pages)
Flaws (1)

Note! 19 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTML/Reference/Elements/model
Title: <model>: The HTML Model element
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/Accessibility/ARIA/Reference/Roles/model_role
External URLs (13)

URL: /en-US/docs/Web/API/HTMLModelElement/boundingBoxCenter
Title: HTMLModelElement: boundingBoxCenter property


URL: /en-US/docs/Web/API/HTMLModelElement/boundingBoxExtents
Title: HTMLModelElement: boundingBoxExtents property


URL: /en-US/docs/Web/API/HTMLModelElement/environmentMap
Title: HTMLModelElement: environmentMap property


URL: /en-US/docs/Web/API/HTMLModelElement/playbackRate
Title: HTMLModelElement: playbackRate property


URL: /en-US/docs/Web/HTML/Reference/Elements/model
Title: <model>: The HTML Model element

@wbamberg
Copy link
Collaborator

wbamberg commented Jun 6, 2025

I've talked about this PR with some of the other MDN maintainers, and we don't think this feature is ready to be documented on MDN yet (and therefore isn't ready for a review yet). We use two main criteria for deciding when a feature is ready: the extent to which it's implemented in browsers, and the extent to which there's a stable, detailed, specification for it.

The key place these criteria are described is https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/What_we_write#when_we_document_a_new_technology . In particular, this lists the following as a reason not to document a feature:

It doesn't have a specification or the specification is a rough note that looks liable to change,

This seems applicable to the spec as it stands: https://immersive-web.github.io/model-element/. I know the PR description here says:

While the specification doesn’t have a lot of detail, the API in visionOS is based on the consensus discussion in the CG, and is described in the Model Element explainer: (https://github.com/immersive-web/model-element/blob/main/explainer.md )

...but the explainer is also not detailed enough to function as a spec.

It's my understanding that this is shipping in a technical preview of VisionOS. AFAIK only shipping in a technical preview doesn't count as "shipping" for our purposes, because it doesn't represent evidence that the feature is stable.

The underlying reason for these criteria is that we don't want to document things that are likely to change a lot or potentially not be adopted at all. When we document things too early, one of these things happens quite often.

I think the best plan would be to mark this PR a draft, and continue to update it as the specification matures, and ask for a review when the specification is stable and it is shipping.

@wbamberg wbamberg removed their request for review June 6, 2025 23:37
@zachernuk
Copy link
Author

Thank you for the reasoned response, @wbamberg. I’ll aim to revisit this if/when a browser releases the feature and we have a better basis to reason about what the spec needs to clarify.

@zachernuk
Copy link
Author

HTML Model element is now available by default in visionOS 26! Now that more folks will actually be able to see it, I believe we'll be able to start negotiating and filling out specification-class descriptions for multiple vendors to agree on.

@wbamberg I'm open to your recommendations as to whether we add detail to MDN piecemeal, as it's added to a spec, or if we can provide the current state as-is and revise/refine once other vendors are in a position to help us define mandatory algorithm structures etc.

@wbamberg
Copy link
Collaborator

@wbamberg I'm open to your recommendations as to whether we add detail to MDN piecemeal, as it's added to a spec, or if we can provide the current state as-is and revise/refine once other vendors are in a position to help us define mandatory algorithm structures etc.

I think it makes sense to wait until the specification is stable and detailed and then file a PR to document the whole thing.

@estelle estelle marked this pull request as draft June 16, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/xl [PR only] >1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants