Open zcorpan opened 4 years ago
Hi Simon, Welcome to the community group, and thank you for this review! Yes, even this explainer needs iteration.
I hope my feedback here is helpful for the getting from here to there.
Yes, it is, and insofar as I am able to fix it, I will. We are willing to do what it takes to get there from here. Hopefully we can use your and others' feedback to improve the proposal. Keep in mind the proposal as summarized is from the OGC community who have worked on it so far, with myself as the editor. We have been waiting for more of the Web platform community to join us, and so your review is very welcome in that regard.
I think it should be positioned as one proposal out of several when several exist, and be open to being evaluated as such.
The biggest challenge is to gain collaborators even willing to read your proposal (I am no better than anyone else in this, probably worse actually), much less make independent proposals. In preference to choosing among proposals, which I think might waste people's good will, it has always been the intention of this group to work in the open so that people could fork and propose/pull requests, so as to obtain the best result for the Web that can be agreed upon, and one which responds to the HTML Design Principles. You mention process above:
I'll skip reviewing the remainder of the explainer for now. If getting maps a first-class feature in the web platform is a goal, the process is imperative to its success.
I think we should create an issue about what the process is we're going to follow. That would help have something to refer to and discuss.
The ideas of the HTML Design Principles and Extensible Web Manifesto are hopefully burned into the process. The challenge in the latter is to scope out what primitives (that don't yet exist) that are common to others needs but on which Web maps, a high-level feature - and the goal of the EWM process, might be built.
I've started reading https://maps4html.org/HTML-Map-Element-UseCases-Requirements/ today, and my feedback so far is that it is much clearer and and doesn't leave me with questions and concerns like reading the explainer did. It also seems to have an idea about the process for the work, and a plan for accessibility, privacy, security. Very nice!
I think a summary that document would make for an excellent part of a new explainer.
For evaluating different proposals, or comparing them to existing alternatives, a table like https://github.com/jackbsteinberg/std-toast/tree/master/study-group#table-of-comparison could be used to get an overview of how different solutions compare on use cases, features, or other aspect you want to compare.
For evaluating different proposals, or comparing them to existing alternatives, a table like https://github.com/jackbsteinberg/std-toast/tree/master/study-group#table-of-comparison could be used to get an overview of how different solutions compare on use cases, features, or other aspect you want to compare.
Good suggestion.
I think this could be used to show how / if the proposal responds to the Use Cases and Requirements, because that document provides examples of the use case as implemented by a number of popular mapping frameworks. I started writing this issue how this proposal could respond to use cases. My intention was / is to ask the community to iterate on the proposal until it responds appropriately to all use cases.
Similar to the toast study table, the Web map use case could be listed down the page and the framework/polyfill across the top. I think the answers might be more complex than yes or no, or at least they could have links to the use case, the example Web maps, proposals, polyfill example page and so on.
Such use case/framework tabulations might also be valuable in determining how the use case should be supported i.e. does it need to be built into the platform as markup, or could it be accomplished by progressive enhancement. Currently almost all map use cases are accomplished through progressive div enhancement :-).
Picking another specific conversation from your comments, perhaps better to have over on that repo but for context starting here.
map
is a legacy element in HTML and is treated as essentially obsolete; it hasn't gotten new features or improvements, other than for web compat and interop.
I can see this POV, but I don't fully understand it. map
has definitely been lacking maintainer support, despite requests over the years for it to be made responsive. With the <picture>
element it would seem to be possible. I've read platform developers recommend to use svg instead of using map to support the responsive use case, I guess because they do consider map to be legacy.
Reusing legacy elements in HTML for new features is usually not a good choice, as web compat constraints what can be done
Yes. I was hoping to better understand what the constraints are, specifically, in proposing to provide new enhanced behavior for this element set. If it can't be done I guess there's no choice and we'll have to propose something new.
and it can be a source of confusion for web developers.
Instead of implementers potentially spending authors' time, allowing them to investigate how to use a map element only to find that isn't maintained properly, it might be better to maintain the element and keep it up to date. I've read that authors use the map element because it is inherently accessible for simple maps, and it would be less confusing (for authors, imo) to make a "map" element work for both simple and advanced maps instead of introducing a second element set for the advanced scenario and neglecting, or recommending SVG for the simple scenario. I think the latter situation is a potential source of confusion for authors, too.
The web compat constraints cannot be understated. map is used on 1.96% of the web. Even things that seems minor can break pages. If you want to reuse a legacy element for a new feature, you need a very compelling case to make it worth the risk.
map/img/area implement layering using a shared coordinate system. In addition to the priority of constituencies argument, this makes it a logical extension point of HTML for more advanced maps.
We haven't really tackled the entire MapML vocabulary in these comments yet, but in developing that proposed specification, we have identified, for example, new input type
(s), new attributes for link
, and probably other extensions that I don't recall right now, but for instance: img
, head
, body
etc. These proposals were done for these elements for much the same reason as for the map element: extending existing "semantics" instead of adding new, slightly incompatible forms, which I believe is aligned with various principles in section 2 of the Design Principles.
The proposed extension would create a standard
This is opening a can of worms. Does this happen for all map elements? If yes, how does that not break web compat?
Some time ago the Web platform community developed a denylist for elements that should not be allowed for developers to add a shadowRoot to, because it might be the case that the Web platform would want someday to add its own shadowRoot there, much like the video element has. I made sure to ask that map be on the denylist for that reason. As a result, I don't think the platform will come across a map element in the wild that has a shadowRoot.
If no, and it's toggled by an attribute, that seems like considerable implementation complexity and an unnecessary source of bugs.
Regardless of whether it is map or some new element, there will need to be a container for browser provided controls, similar to video, I believe.
The proposed extension would create a standard
<map>
widget that contains controls in a closed shadow root,This is opening a can of worms. Does this happen for all map elements? If yes, how does that not break web compat? If no, and it's toggled by an attribute, that seems like considerable implementation complexity and an unnecessary source of bugs.
I believe the answer is no, it should only apply to map elements with one or more descendant <layer>
elements.
Non-goals
- Changing the operating model or availability of existing spatial (map) content management systems, APIs and Web Services.
- Backwards-incompatible changes to HTML / breaking the Web
Breaking the web is not a non-goal, it's an anti-goal (or requirement to not do).
@prushforth are either of the two list items non-goals? (I.e. currently out of scope, but potentially future goals?)
My understanding is that MapML does not intend to introduce backwards-incompatible changes.
To try to be positive about it:we want to be able to use existing content, and we don't want to break anything on the Web. Does that help? A big plus would be if the currently evolving OGC APIs would be designed to work with MapML. In that case, we should be able to negotiate change before they become hardened. Just need that community to start thinking browser-first, I guess.
A big plus would be if the currently evolving OGC APIs would be designed to work with MapML.
That sounds like a non-goal to me. Is that what the first list item is trying to convey? In that case I think it should say "Integrate the operating model or availability of existing spatial (map) content management systems, APIs and Web Services.".
I'm asking because I'm currently on a local branch, intending to address some of @zcorpan's feedback.
Ok. The goal is to work within the framework suggested by the rest of independent invention: use existing content AND to not ask for backward incompatible changes to html. At least that's what I was trying to say.
The complexity of choices and the wide variety of technologies required to create Web maps results in maps of highly variable usability and accessibility.
I don't really follow this. Usability and accessibility are used but without substance.
without substance
Is this where I link to the accessibility evaluation of the reviewed web map tools and dust my hands off? 👏😌
@Malvoz Sounds good. 🙂
@prushforth I've made edits to @zcorpan's review comment (I hope that's okay) so that it's easy to tell what is yet to be adressed.
For evaluating different proposals, or comparing them to existing alternatives, a table like https://github.com/jackbsteinberg/std-toast/tree/master/study-group#table-of-comparison could be used to get an overview of how different solutions compare on use cases, features, or other aspect you want to compare.
Good suggestion.
We now have the MapML UCR Fulfillment Matrix (linked from the Use Cases and Requirements section).
How will accessibility be addressed?
I've opened 2 issues to help partially answer that: https://github.com/Maps4HTML/MapML-Proposal/issues/41 and https://github.com/Maps4HTML/MapML-Proposal/issues/43.
The proposed extension would create a standard
<map>
widget that contains controls in a closed shadow root,This is opening a can of worms. Does this happen for all map elements? If yes, how does that not break web compat? If no, and it's toggled by an attribute, that seems like considerable implementation complexity and an unnecessary source of bugs.
It only happens for <map>
elements with the controls
attribute (which should be clearer now, from the example code).
I suppose the complexity is on par with only upgrading elements based on attributes and/or child elements of <map>
: https://github.com/Maps4HTML/MapML/issues/97.
How will accessibility be addressed?
Another thing that we can mention is - with a standard for maps - conformance checkers can warn about accessibility issues.
Similar to missing alt
on img elements, https://validator.w3.org/nu/:
Error: An
img
element must have analt
attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
In most map libraries, markers and other vector features are usually div
or SVG elements (many times non-focusable) without accessible names.
MapML <feature>
(currently proposed role="feature"
) OTOH would provide a more accessible baseline for map features, and in the case of a missing <featurecaption>
conformance checkers could warn the author.
I've reviewed the explainer yesterday and today. I haven't yet reviewed other MapML material, so take this as my raw first reaction to reading this explainer.
At a high level, this explainer doesn't help me understand the problem very well. I see a series of claims that I don't understand how they follow from one to the other. Different concerns are not separated; the proposal is mixed with the problem statement.
I have concerns about the extensions of existing HTML elements being risky for web compatibility.
Accessibility, security and privacy are mentioned in passing but not really addressed.
I think the explainer should be rewritten to more clearly explain the high-level problems (based on the Use Cases and Requirements doc), explain the proposal (for a web developer audience; no need to cover all aspects of the proposal), alternatives, how those proposals address those problems.
The explainer is also too long; too much detail of the proposal.
More details inline:
(Note: I found the bold formatting makes this harder for me to read. I've removed bolding here.)
(Edit by @Malvoz: Bold formatting removed in https://github.com/Maps4HTML/MapML-Proposal/pull/19/commits/f8866400525be9a375ac8e71925911b6f953c865.)
I can follow perfectly this far. 🙂
It would be good to provide evidence of this (not necessarily in the introduction).
Why does the web platform, especially the mobile web, need that?
Obligatory XKCD: https://xkcd.com/927/
I don't really follow this. Usability and accessibility are used but without substance.
(Edit by @Malvoz: Adressed by linking to the Web map tools WCAG 2.1 evaluation, in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/edf64d6fb006f61ead9873df8c9a3416a708ba53.)
Any citation for this cause and effect claim?
How is this a problem?
Is the device permissions model for native mobile apps here still accurate?
Is the tracking and ads problem solved by this proposal?
Is the existance of centralized mapping services a problem?
How is this section different from the previous one? (Should this be "The Proposal"?)
(Edit by @Malvoz: Changed the section heading to "The Proposal" in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/9183add07aa0f238a32491c70ecfc5e13e2fdf18.)
The claim is to reduce complexity. But the proposal has considerable complexity. It's not clear that the existing stuff will go away once this exists. So it's not reassuring that complexity will be reduced for anyone.
This is briefly discussing the method and also a solution.
How? Usability for whom?
How?
How?
What do tracking-free mapping services need?
How will accessibility be addressed?
How will it be cheaper?
This is part of the proposal and doesn't belong in the goals.
(Edit by @Malvoz: Moved this part from the goals section in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/8d983f62e631fb78d9a759bf1086b93e2288a7db.)
This by itself is a goal.
(Edit by @Malvoz: Extracted this part to describe a goal in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/8d983f62e631fb78d9a759bf1086b93e2288a7db.)
This last bullet point also seems to mix in the proposal. Is the goal to have one serialization format that is adopted by all spatial content management systems, APIs and Web Services?
Breaking the web is not a non-goal, it's an anti-goal (or requirement to not do).
(Edit by @Malvoz: Removed this non-goal in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/2a7800b0c924e86e72c2b78174fbbc52213dfa6e.)
Good questions, and we should answer them and evaluate different proposals against the use cases and requirements.
That maps is a mature problem space and we can reach for a high-level API makes sense, but those APIs should still be on top of low-level primitives (existing or new ones).
map
is a legacy element in HTML and is treated as essentially obsolete; it hasn't gotten new features or improvements, other than for web compat and interop. Reusing legacy elements in HTML for new features is usually not a good choice, as web compat constraints what can be done and it can be a source of confusion for web developers.The web compat constraints cannot be understated.
map
is used on 1.96% of the web. Even things that seems minor can break pages. If you want to reuse a legacy element for a new feature, you need a very compelling case to make it worth the risk.(Edit: filed https://github.com/Maps4HTML/HTML-Map-Element/issues/30 )
This is opening a can of worms. Does this happen for all
map
elements? If yes, how does that not break web compat? If no, and it's toggled by an attribute, that seems like considerable implementation complexity and an unnecessary source of bugs.What markup goes in a
layer
?Move the polyfill reference to an appendix or separate section.
(Edit by @Malvoz: Moved to a separate section in https://github.com/Maps4HTML/MapML-Proposal/pull/21/commits/15bfd7c5b21a2d8a2569232ef20fea09731c15ab.)
Other examples:
<canvas>
(imperative), SVG (declarative). While they are things that have a coordinate space, and maps have that as well, it doesn't follow that it necessarily makes sense to build a maps feature on top of them.(I'll review that separately.)
"(almost) unmodified HTML parser" implies modifications. Which ones, and why? Proposals to change to the HTML parser is usually met with resistance from browser vendors due to the risk of resulting security problems. See https://github.com/whatwg/html/issues/2253#issuecomment-272100126
(I'll review the spec separately.)
What does almost-existing browser code infrastructure mean? What infrastructure is missing?
I appreciate the chicken-and-egg problem, but I think it's not really a problem. Browsers implement features based on the feature's own merit all the time, without needing prior existing content. The motivation for a polyfill should be to get real-world experience and iterate on the API shape to inform what the standard API should look like, and to demonstrate support from web developers.
Moreover, I think creating a legacy of web content before a proposal is implemented can hurt the proposal more than it helps. Bugs in the polyfill can get relied on by web content, resulting in the final API needing to use different names from what is used in the polyfill. (Examples:
Array.prototype.contains
;Node.prototype.rootNode
)For the situation of no browser implementation and only a polyfill, I suggest not using the names that you want to reserve for the final API until it is shipped by at least one browser. (This was practiced by PictureFill, which used
span
s untilpicture
was implemented in browsers.)Even using a feature after it has been shipped by one browser is not without problems: bugs in the first implementation can get relied on (accidentally) by web content, leading to those bugs getting "stuck", and other vendors having to copy those bugs, or it can take considerate effort over many years to remove the original API. (Example: Shadow DOM, which had a spec, then shipped, then the spec changed significantly, but the original implementation couldn't be removed due to web compatibility. "v0" was finally removed this year, 6 years after it was introduced, and 4 years after "v1" shipped.)
I'll skip reviewing the remainder of the explainer for now. If getting maps a first-class feature in the web platform is a goal, the process is imperative to its success.
I'm looking forward to seeing those alternatives documented.
It's not a waste to develop a concrete proposal, but I think it should be positioned as one proposal out of several when several exist, and be open to being evaluated as such.
I hope my feedback here is helpful for the getting from here to there.