Skip to content

Allow adaption of <figcaption> based on chosen <source> #254

Closed
@Boldewyn

Description

@Boldewyn

Based on this tweet: https://twitter.com/iandevlin/status/538313179450060801

The use case: A photo of 5 people, art direction cuts off the left-most human for some variants. Then a <figcaption>John Doe, 2nd from left</figcaption> is not possible reliably.

Possible fix: Re-use the for attribute:

<figure>
  <picture>
    <source id="wide">
    <source id="narrow">
  </picture>
  <figcaption for="narrow">John Doe, left-most</figcaption>
  <figcaption><!-- default caption: -->John Doe, 2nd from left</figcaption>
</figure>

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