cran-task-views / ctv

CRAN Task View Initiative
80 stars 13 forks source link

HTML headers starting on `h2` #34

Closed basille closed 2 years ago

basille commented 2 years ago

Hi,

I just noticed that the HTML version of the CTVs put the main header (the name of the CTV) at the top of the page as h2, making the page an h1-less HTML page. Subsequent automatic HTML headers are h3. Is there a reason for this, and not using h1/h2 instead?

zeileis commented 2 years ago

We have followed the style that CRAN uses for the individual package pages (and also rely on the same CSS). Package pages also just have left-aligned <h2> headers instead of the centered <h1> headers.

basille commented 2 years ago

Oh I see. Thanks for the clarification @zeileis! I guess that all comes down to the frames architecture of CRAN… This in itself would take a long time to discuss (and that's not the right place here), but that allows to embed package/CTV pages into the CRAN website (with the menu on the left).

It is frustrating to see that most people will find the packages or CTV through their canonical URLs (e.g. https://cran.r-project.org/view=Tracking), which renders as an incomplete web page, without h1. For instance, I understand that accessibility readers expect a h1 header, which is absent here. We're making the efforts to have the page accessible (e.g. alt-text; I also added a TOC), but the structure of the page itself is broken. From a Markdown perspective, it does not make sense either to start with ### (given that h2 is provided her by the YAML header). Anyway, nothing more than a rant here, that should go directly at CRAN.

zeileis commented 2 years ago

I agree that the CRAN web design leaves quite a bit of room for improvement. But concerning the task views I feel there are more important issues to work on at the moment.

basille commented 2 years ago

Agreed.