-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: show help text if defined for Content components #3012
Conversation
<HelpButton | ||
variant="help" | ||
title={`More information`} | ||
aria-label={`See more information about this content`} |
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 whole block is borrowed straight from our existing <QuestionHeader />
.
Ideally this aria-label
would smartly parse out the h1 from the rich text rather than say "this content" but I think this should be sufficient for now?
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.
Agreed - I think this is fine for now, and possibly fine full stop?
There's only one context for "this content", and not multiple options (like our aria-label
s on change buttons for example".
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.
One for possible future discussion — should the content component also have a title, separated from the rich text input? It would mitigate the "every page must have a H1" issue we've seen highlighted elsewhere, although a review of the current usage of this component would be needed.
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.
We currently have a rich text helper method incrementHeaderElements()
which automatically adjusts header heirarchy to help combat that "every page must have an H1" issue - it's not perfect, but does help catch a number of user-errors!
Agree that another possible way forward here would be to require more structured input for Content nodes - but then they basically become Notices? Let's keep an eye on it 👍
Removed vultr server and associated DNS entries |
<HelpButton | ||
variant="help" | ||
title={`More information`} | ||
aria-label={`See more information about this content`} |
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.
Agreed - I think this is fine for now, and possibly fine full stop?
There's only one context for "this content", and not multiple options (like our aria-label
s on change buttons for example".
Bug report via August. You can define help text in the editor for Content nodes, but it was never displayed on the frontend - presumably because this component doesn't use the
QuestionHeader />
.This now displays the "More information" link below the rich text content block if defined like this: