-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Fix multiple <h1>
in classes/index.html
documentation
#98795
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
You might find multiple `<h1>` in `https://docs.godotengine.org/zh-cn/4.x/classes/index.html`. Fix by passing `------` instead of `======` to heading, so the subtitle in `index.rst` generate correctly.
In some ways, this is expected. "All Classes" does not express a hierarchical relationship. It is like "Top" or "Index", the same as the other categories to quickly locate a place on the page. |
Yes it make sense, but:
|
It's a link to jump to the top of the page, showing all the classes. Ideally, each section should be a dedicated page, and All Classes should be listing classes alphabetically. That's also why sections
|
MDN help has this to say on the topic:
Also WebAIM:
Having spent last 2 months on making our company's site accessible, I recommend having one h1 only. Screen readers and other accessibility software like Dragon Dictate can get confused with multiple h1s |
How about: <h1>A list of all classes</h1>
<!-- ... -->
<h2>All classes</h2>
<h2>Nodes</h2>
<!-- ... -->
<h2>Resources</h2>
<!-- ... -->
<!-- ... --> Which makes them stay at the same level while fixing multiple |
An additional complexity here is that this current implementation results in some documents being listed in multiple of these categories (e.g. Node or Resource, or some of the Editor nodes), and as every category here is a toctree, those documents get listed as part of multiple toctrees, which Sphinx complains about. So we will likely need to move away from a "All classes" category anyway and need to make sure everything is listed at most once, in a single category. Otherwise, we get tons of warnings like these from more modern Sphinx versions:
|
You might find multiple
<h1>
inhttps://docs.godotengine.org/zh-cn/4.x/classes/index.html
.Fix by passing
------
instead of======
to heading, so the subtitle inindex.rst
generate correctly.