ocsigen / ocsigen/tyxml

input element allows name attribute values "isindex", ""

Open
#347 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
179
Forks
63
Avg merge
5h
Merged PRs (30d)
22

Description

Today I learned that you can't use the "isindex" value for the name attribute of e.g. :
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-name

Neither is an empty name allowed, but tyxml accepts both:

let _ = Tyxml.Html.(input ~a:[a_name "isindex"]) ()
let _ = Tyxml.Html.(input ~a:[a_name ""]) ()

It is personally not a problem for me, but since you advertise in the README that "TyXML is a library for building statically correct HTML5 [...] documents" I thought I would let you know :D

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Tyxml.Html input example and the a_name attribute constructor mentioned in the issue, then trace how name values are checked. Determine how the existing validation represents the two rejected values and verify that both examples are handled as invalid without weakening other input attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, ocaml
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.