mdn / interactive-examples

Home of the MDN live code editor interactive examples
Creative Commons Zero v1.0 Universal
726 stars 506 forks source link

move citation out of blockquote per spec #2806

Closed estelle closed 1 month ago

estelle commented 1 month ago

fixes https://github.com/mdn/content/issues/28401

Josh-Cena commented 1 month ago

This significantly changes the layout of the quote and I'm not sure if anyone would be doing this. Usually, when rendering a quote, you would expect the attribution to be styled as if it's part of the quote (gray color, left vertical line, right aligned, etc.), and not as if it's any other paragraph. This was why, before https://github.com/mdn/interactive-examples/pull/2562, it was wrapped in another figure, so styles can be applied to the figure. figure/figcaption is also the spec-recommended structure when writing attribution. However based on https://github.com/mdn/content/issues/28401#issuecomment-1666396747, it seems this actually degrades screen reader performance? Maybe we should get the spec authors to clarify?

estelle commented 1 month ago

However based on mdn/content#28401 (comment), it seems this actually degrades screen reader performance?

That's why i didn't use figcaption.

changes the layout of the quote

I updated the CSS and HTML to make it look like a blockquote without adding any semantics for a screenreader to find.

Josh-Cena commented 1 month ago

OK, I'm +1 on the current form, but do we want to clarify in content that although the spec says to use figure, it's actually bad for some screen readers?

estelle commented 1 month ago

OK, I'm +1 on the current form, but do we want to clarify in content that although the spec says to use figure, it's actually bad for some screen readers?

Not in the interactive example, as I assume most people don't actually read the content in the example.

Josh-Cena commented 1 month ago

@sideshowbarker Since you approved https://github.com/mdn/content/pull/34813, could you take a quick look at this too? (You are probably also more knowledgeable about HTML than me.)

sideshowbarker commented 1 month ago

@sideshowbarker Since you approved mdn/content#34813, could you take a quick look at this too? (You are probably also more knowledgeable about HTML than me.)Maybe we should get the spec authors to clarify?

  1. Given that at https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element:the-blockquote-element-4 the spec text itself is unambiguous:

    Attribution for the quotation, if any, must be placed outside the blockquote element.

  2. Over many years of discussions about the spec that I’ve followed (going back 17 years or more), I’ve seen this debated many times — with some people expressing very strong disagreement with it (including some prominent “standardista” influencers) — but the resolution has nevertheless always been to keep that attribution-must-be-placed-outside-the-blockquote requirement in there

…then I’m certain the answer from the spec authors would just be, “That’s what the spec says”. I think they’d probably even not suggest that anyone open a new issue if they disagree — because there have already been issues for it, and they’ve been resolved, and it doesn’t seem like there’s any new information which merits re-visiting those.

So I think as far as MDN goes, we have an obligation to conform to the spec requirements, and I’ll go ahead and merge this.

github-actions[bot] commented 1 month ago

Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.