Open
Description
I believe following the rules for parsing for implied properties an empty alt text value should not be overriding the name
or value
of the h-card
in this case.
<article class="h-entry">
<a href="https://example.com" class="p-author h-card">
Example
<img src="https://example.com/image.jpeg" class="u-photo" alt="">
</a>
</article>
Output from https://microformats.github.io/microformats-parser/:
{
"items": [
{
"type": [ "h-entry" ],
"properties": {
"author": [
{
"type": [ "h-card" ],
"properties": {
"photo": [ "https://example.com/image.jpeg" ],
"name": [ "" ]
},
"value": ""
}
],
"photo": [ "https://example.com/image.jpeg" ]
}
}
]
}
Expected output as seen in python and PHP parsers:
{
"items": [
{
"type": [ "h-entry" ],
"properties": {
"author": [
{
"type": [ "h-card" ],
"properties": {
"photo": [{
"value": "https://example.com/image.jpeg",
"alt": ""
}],
"name": [ "Example" ]
},
"value": "Example"
}
]
}
}
]
}