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

<aside> more appropriate than <figure> for wrapping Pull Quote #14606

Closed
m-e-h opened this issue Mar 24, 2019 · 5 comments
Closed

<aside> more appropriate than <figure> for wrapping Pull Quote #14606

m-e-h opened this issue Mar 24, 2019 · 5 comments

Comments

@m-e-h
Copy link
Member

m-e-h commented Mar 24, 2019

Describe the bug
Currently the PullQuote block outputs this HTML:

<figure class="wp-block-pullquote">
  <blockquote>
    <p>Hello Pull Quote</p>
  </blockquote>
</figure>

The HTML5 specifications suggest it should look something like this instead:

<aside class="wp-block-pullquote">
  <blockquote>
    <p>Hello Pull Quote</p>
  </blockquote>
</aside>

The W3C docs for the figure element have this to say:

For content that is only tangentially related, or that serves a separate purpose than the surrounding flow, the aside element should be used (and can itself wrap a figure).

For example, a pull quote that repeats content from an article would be more appropriate in an aside than in a figure, because it isn't part of the content, it's a repetition of the content for the purposes of enticing readers or highlighting key topics.

@youknowriad
Copy link
Contributor

Looks like this was already discussed and abandoned here #9599

cc @afercia @jasmussen

@afercia
Copy link
Contributor

afercia commented Mar 25, 2019

The HTML5 specifications suggest it should look something like this instead:

Not sure it does in the definition of the blockquote element:
https://www.w3.org/TR/html52/grouping-content.html#the-blockquote-element

Instead, there's one example of blockquote within an aside in the aside element definition: https://www.w3.org/TR/html52/sections.html#the-aside-element
That's a very specific case: tweets are certainly "tangentially related" to the main content. Instead, inline quotes are part of the content.

@m-e-h the point you raised is valid, but only in one specific case. The bit you quoted from the figure element documentation makes it clear:

For content that is only tangentially related, or that serves a separate purpose than the surrounding flow, the aside element should be used (and can itself wrap a figure). For example, a pull quote that repeats content from an article would be more appropriate in an aside than in a figure, because it isn’t part of the content ...

Theoretically, there should be a way to distinguish when a quote is or isn't part of the main content.

Regardless, there's an important consequence to consider. The <aside> element has an intrinsic role of complementary thus it's actually an ARIA landmark. Landmarks are meant to indicate main regions of a page to facilitate navigation for assistive technologies users. It's essential to keep landmarks to a reasonable, predictable, amount so that users can can actually use them.

See also #9599 (comment)

@m-e-h
Copy link
Member Author

m-e-h commented Mar 25, 2019

Sorry for the duplicate. I should've searched a little better. I came across that W3C recommendation while researching something unrelated and wanted to open an issue here before I forgot.

I do think that aside is the correct way to do Pull Quotes. In reading through all the related W3 recommendations linked here, I only see "Pull Quotes" mentioned once and an aside is what's suggested.

Wouldn't something that is

for the purposes of enticing readers or highlighting key topics.

be considered a main region of a page?

You do make an excellent point, though, @afercia and it leads me to think aside probably isn't such a good idea here.

It's essential to keep landmarks to a reasonable, predictable, amount

When choosing between a Quote and a Pull Quote, I sometimes just select the first one I see or whichever is styled the way I want. I'm assuming the typical user might do the same thing.
This assumed usage makes Pull Quotes anything but "reasonable" or "predictable".

Probably best to stick to what we currently have. I'm thinking we should close this issue since it was already discussed in #9599 . Any reason to leave it open?

@afercia
Copy link
Contributor

afercia commented Mar 25, 2019

Any reason to leave it open?

Kept open to be fair and and allow you to reply :) Closing now, if no objections.

@afercia afercia closed this as completed Mar 25, 2019
@AlchemyUnited
Copy link

I realize this is closed but...

It would seem to me

is less appropriate than . That said, if as @afercia mentions aside is a ARIA landmark then I would think it could be . For all intents and purposes, a blockquote is a decorative image, and decorative images are supposed to be tagged so AT ignores them. That is, a blockquote is more for visual aesthetics than actually adding content value, as the content has already been - or will be - presented on the page in a paragraph or perhaps a list.

In short, I would think it's rare that AT needs to be aware of a blockquote; in the same way AT doesn't need to be aware of decorative images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants