Skip to content
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

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

jessicamcinchak
Copy link
Member

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:
Screenshot from 2024-04-11 17-44-58

@jessicamcinchak
Copy link
Member Author

<HelpButton
variant="help"
title={`More information`}
aria-label={`See more information about this content`}
Copy link
Member Author

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?

Copy link
Contributor

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-labels on change buttons for example".

Copy link
Contributor

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.

Copy link
Member Author

@jessicamcinchak jessicamcinchak Apr 12, 2024

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 👍

Copy link

github-actions bot commented Apr 11, 2024

Removed vultr server and associated DNS entries

@jessicamcinchak jessicamcinchak requested a review from a team April 12, 2024 07:33
<HelpButton
variant="help"
title={`More information`}
aria-label={`See more information about this content`}
Copy link
Contributor

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-labels on change buttons for example".

@jessicamcinchak jessicamcinchak merged commit 0db8771 into main Apr 12, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/show-help-text-content branch April 12, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants