-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
docs: add category heading in docs pages #8918
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
Conversation
Thanks for the idea. Personally, after browsing around the deployed preview version of the site, I don't think I'm in favor of this change. I find it a bit odd to have two headings and to have a larger heading below a smaller heading. |
Your styling suggestion looks indeed much better than mine @PuruVJ |
{#if category} | ||
<p class="category" aria-label="category">{category}</p> | ||
{/if} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we end up doing this, we should remove the aria-label
- it doesn't have any effect on <p>
elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... i'm not good at a11y, i was trying to give some semantics, but did not really know what tag to choose.
Do you think the <p>
alone is good enough, or is there another tag more relevant ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, i just realised there is the aria-description
that could fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this! If others also agree, then lets go ahead and merge it cc @dummdidumm @benmccann
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does look better to me
Co-authored-by: Ben McCann <[email protected]>
I find it useful to have the category displayed at the top of a doc page. It allows the reader to know instantly which category he/she's in.