javascript
javascript copied to clipboard
Port `SubHeadingsKeywordAssessment` to work with the tree.
The assessment should extend the class that has been created in https://github.com/Yoast/javascript/issues/413. It should return the same result as the current SubHeadingsKeywordAssessment, but with a slightly different API. See the base class to see what the changes are to the API
My intention with the new tree research is that this assessment should have an easy time finding all headings with keywords. It should be a matter of: (pseudocode)
let headings = researcher.getResearch( "headings", completeTree );
headings.forEach( ( heading ) => {
const keyphrases = researcher.getResearch( "keyphrases", heading );
const hasKeyphrase = keyphrases.length > 0;
// Determine assessment results...
} );
Requires Yoast/YoastSEO.js#2194 Requires Yoast/YoastSEO.js#2193