Skip to content

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

Open
@Krinkle

Description

@Krinkle

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?

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