-
Notifications
You must be signed in to change notification settings - Fork 223
Add backlinks to elements in solutions sections #2610
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
base: master
Are you sure you want to change the base?
Conversation
|
I haven't looked closely at this, but I note that it touches on a lot of delciate code that ensures heading levels elevate correctly. Like, not following an I used the Firefox headingsMap extension a lot when we put all that together. It highlights when headings are out of line like that. There are still things that it won't catch, that need manual eyes. For example, if there are adjacent headings that should be One of the complications is that the heading level of something where it is born might be (for example) 3. But then when that thing appears somewhere else, like in a "solutions" page, it may need a different heading level. |
I'm as confident as I can be I suppose. So the first two commits add new "tests", then the moving around is done on the 3rd and 4th commit, and my guide throughout that process was a before- and after- diff of the sample-article build with the publication-crc settings, and observing that the versions are identical (except for the obviously different compile-time timestamp). So at least on the sample-article source code the results of the refactoring should be identical to the before state. Then the last commit, which adds the backlinks, simply surrounds the title part with an anchor tag (does this need any accessibility extras btw?). The algorithm for determining what heading level to use has remained unaffected as far as I can tell, in the mode="hN" template. But yes it's a biggish change, which is why I wanted as many eyes on it as possible. Are there other projects that I should use as test cases, beyond the sample article? |
|
If you were doing diffs on the output HTML from the sample article, that is great. It has all of the complicated cases from when this was tested before, and no other projects were used in testing at that time. If you didn't see any "hN" changing their level, I'd be confident things are good in that front. If it's not much trouble, if you can post the sample article build somewhere public, I'd look at the accessibility question you asked. |
|
Let's see if this works: https://skiadas.github.io/temp-sample-backlinks/derivatives.html |
@Alex-Jordan Did you have a chance to review this by any chance? |
7eb70e8 to
47e3431
Compare
This should be addressing #2606 but also includes a fair amount of refactoring: