Skip to content

Make img alt information available #112

@barnabywalters

Description

@barnabywalters

Currently, when parsing mf2 data which includes alt information for properties parsed from images, XRay has no way of making the alt information available to library consumers.

This might additionally be a JF2 issue, as the current spec doesn’t mention image alt values at all https://jf2.spec.indieweb.org/

Potential solutions which come to mind:

  • Provide img+alt structures where alt information is available, forcing consumers to check whether every image-based property is a string or img+alt array before consuming (breaks existing code)
  • Provide img+alt structures by default on every property which is parsed as an image, with empty alt values if none is found. Breaks existing code but is more consistent.
  • Use either the ref(erences) list or a new “alts” list on jf2 objects to provide the alt value, indexed by the image URL. This would not break any existing code afaik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions