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

API Sites: Space between signature and return in heading #75

Open
Krinkle opened this issue Jan 11, 2018 · 1 comment
Open

API Sites: Space between signature and return in heading #75

Krinkle opened this issue Jan 11, 2018 · 1 comment

Comments

@Krinkle
Copy link
Member

Krinkle commented Jan 11, 2018

The HTML code for typical API page headers like the following, uses inline elements without a space in between their markup.

screen shot 2018-01-11 at 20 44 56

<article id="jQuery-each1" class="entry method"><h2 class="section-title">
--
  | <span class="name">jQuery.each( array, callback )</span><span class="returns">Returns: <a href="http://api.jquery.com/Types/#Object">Object</a></span>
  | </h2>

Among other potential accessibility issues, I notice this makes for slightly suboptimal results in search engines, e.g. from Google:

screen shot 2018-01-11 at 20 46 01

I'm not quite sure how or where to fix this, but following the chain of XSL files from jquery/api.jquery.com via jquery/jquery-wp-content to jquery/grunt-jquery-content, I suspect this woul be best addressed in entries2html-base.xsl.

Either by adding a single-space <text> node as first part of the return-value template, or by checking its users and placing it there. It looks like we already use <xsl:text> </xsl:text> in a few places, so hopefully not too hard.

I can submit a PR for this, but not sure what would happen after that. What is the release process for patching grunt-jquery-content and making existing sites re-generate their content with the latest version?

@mgol
Copy link
Member

mgol commented May 19, 2021

@Krinkle I have publish rights here so you can ping me for a release; I can also review a PR.

As for updating the docs, grunt-jquery-content is an npm dependency of content sites. It's enough to update it & then tag a commit via npm version patch to have a new version get generated.

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

2 participants