Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnotes: Excerpts displays the link text as a * after the text content #52035

Closed
carolinan opened this issue Jun 28, 2023 · 6 comments · Fixed by #52518
Closed

Footnotes: Excerpts displays the link text as a * after the text content #52035

carolinan opened this issue Jun 28, 2023 · 6 comments · Fixed by #52518
Assignees
Labels
[Block] Footnotes Affects the Footnotes Block [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable

Comments

@carolinan
Copy link
Contributor

carolinan commented Jun 28, 2023

What problem does this address?

When the post content has one or more footnotes, the excerpt block picks up the link text, the visually hidden star, as part of the content.
This might be correct, but I found the result difficult to read.

Example from Twenty Twenty Three:
List of two blog posts where the excerpt block shows the footnotes as a *

What is your proposed solution?

I am not sure if it is worth trying to remove the star from the excerpt. Normally in excerpts, link texts are not removed, but I am not sure if the star indicates clearly enough that it represents a footnote.

@carolinan carolinan added [Block] Footnotes Affects the Footnotes Block [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable labels Jun 28, 2023
@annezazu
Copy link
Contributor

@ellatrix and cc'ing @WordPress/gutenberg-design

@jasmussen
Copy link
Contributor

Good issue. I'd suggest that the excerpt commonly exists to be shown in archive views, where the actual footnote is unlikely to show up. In that light, I'd suggest trying to hide it from the excerpt.

@ellatrix
Copy link
Member

I wonder if we should just remove the asterisk altogether 🤔 That would also remove the CSS hack where we have to hide it to make place for the counter as a pseudo element. OR we have to remove the CSS counter and replace in PHP.

@jasmussen
Copy link
Contributor

Removing the asterisk altogether would make the excerpt have no indication of footnotes, correct? I'd agree with that, it seems fine to have an entirely footnote-less excerpt.

@ellatrix
Copy link
Member

ellatrix commented Jul 3, 2023

That's correct, they would be invisible if no CSS is present. The downside of that there's no fallback if there is no CSS: think of emails, RSS...

One alternative is to not use CSS counters and replace/add the anchor content in PHP.

Any opinions? Cc @mtias @mcsf

@mcsf
Copy link
Contributor

mcsf commented Jul 3, 2023

I chatted a bit with Ella about this.

At first glance, I kind of like the "safety" of CSS-only decorations, in that footnotes gracefully disappear if we are in a context in which we might not expect them, like excerpts. On the other hand, we can't simply ignore syndication, emails and general consumption via the REST API.

I think that part of the solution is to think of footnotes as a first-class concept of posts in the same way that nextpage, more and shortcodes are. But this is scarier. It implies that footnotes should be well handled all throughout the core logic for WP posts.

We have room to play with the exact markup that we choose for the anchors, where/how we style them (with stylesheets, with inline styles, with server-side injection, etc.), but we can't shy away from thinking of footnotes as a first-class concept — think of wp_trim_excerpt, etc.

Finally, let's not forget that there is a lot of nuance even within those modalities: we can be fairly confident that nor the anchors nor the notes should be visible in an excerpt, but when it comes to emails like newsletters I can imagine that different site admins have different expectations (are the footnotes essential to the content, or should users visit the website to read everything?). And what about general consumers using the REST API? Presumably they should be given the full content, but — unlike in the front end — we don't know how they'll handle CSS (especially fancy CSS like counter).

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 11, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Footnotes Affects the Footnotes Block [Type] Feedback Issues that relate purely to feedback on a feature that isn't necessarily actionable
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants