Maps are not supported.
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 179
- Forks
- 63
- Avg merge
- 5h
- Merged PRs (30d)
- 22
Description
Trying to implement the following example from the W3C HTML5 specification: https://www.w3.org/TR/2011/WD-html5-20110525/the-map-element.html#authoring, I stumbled upon several problems.
First, as I discovered it by accident, map [map []] won't compile while the map (TyXML HTML) element is a transparent element.
Second, the alt attribute of the area (TyXML HTML) element is mandatory in HTML5, while it must be omitted when there is no Href attribute.
Third, in TyXML href is not a valid attribute of the area element (As I am the first to report it, I guess no one ever used a map using TyXML 🦉)
Fourth, in TyXML, area is not a valid element within a map element.
Fifth, in TyXML, usemap is not a valid attribute of the img (TyXML HTML) element.
In the following, uncommenting any of the commented regions breaks compilability (does this word exist? 😛)
open Tyxml.Html
let mypage =
html
(head (title (pcdata "hey")) [])
(body [
img
~src:(uri_of_string "shapes.png")
~alt:"Four shapes are available: a red hollow box, a green circle, a blue triangle, and a yellow four-pointed star."
~a:[(* a_usemap "shapes" *)] ();
map ~a:[a_name "shapes"] [
(* map []; *)
(* area (); *)
(* area ~a:[a_shape `Rect; a_coords [50; 50; 100; 100]] (); *)
(* area ~alt:"" ~a:[a_shape `Rect; a_coords [25; 25; 125; 125]; a_href (uri_of_string "red.html")] (); *)
];
])
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Html_sigs.T signatures for map, area, and img, then reproduce the sample from the issue. Check each listed map, area, href, alt, and usemap case against HTML5 requirements; done means the example compiles with all shown regions enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100