Skip to content

implying url property from grandchild elements #50

@willnorris

Description

@willnorris

The microformats-v2/h-card/impliedname test includes the following case:

<div class="h-card"><span><area href="jane.html" alt="Jane Doe"></area></span></div>

The expected value is listed as:

{
  "type": ["h-card"],
  "properties": {
    "name": ["Jane Doe"],
    "url": ["http://example.com/jane.html"]
  }
}

So the url property is being implied by the area[href] attribute. However the parsing spec doesn't mention descending into grandchild elements for implying url properties. It does mention this for both name and photo properties, but not url. So I'm not sure if this is actually an error in the spec or in the tests, but they certainly don't agree.

For comparison, microformat-node (and probably microformatshiv?) seems to be the only library implying the url property in this case: http://willnorris.net/mf2compare/?url=https://willnorris.com/tmp/uf/impliedname-8.html

/cc @tantek @glennjones

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions