-
Notifications
You must be signed in to change notification settings - Fork 237
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
Improve Hint text guidance #778
Comments
@joelanman There is information in the GOV.UK Service Manual too. https://www.gov.uk/service-manual/design/designing-good-questions#add-help-text-where-necessary |
@joelanman does this need to be triaged? If so please add a "new" label and "submitted-by-user" label |
Some things that came up recently:
|
@edwardhorsford we could provide additional guidance for this, but it's relatively complex so this feels more of a feature request for GOV.UK Frontend to make it easier to do. I've raised an issue over there on your behalf. |
Currently, the hint text component accepts HTML which is great because it makes the component flexible. It gets rendered as a If the HTML consists of block level elements then it becomes invalid. The following points are relevant: (1) Interfaces that have a lot of content can be a sign that the design is complicated and needs further work. (2) If we have done the hard work to keep hint text to a minimum, then we might need to look at other ways to present the information. Option A: Use an interruption page with the content that needs reading. Once read the next page can contain a simple label/legend + input(s). Option B: Just have a lot of hint text. This way it’s seen in context of the input and provides a comparable experience for screen reader users. Option C: Allow hint text to contain the Details component which will let users expand content if they need it. There may be other options but as a start I’d suggest:
|
In terms of HTML validation we could consider making the hint component render with a div when supplied with HTML (or at all times) since we make it a block level element anyway with CSS. |
I don't think I quite realised that you couldn't put block level elements in there. I've not checked my whole app, but it wouldn't surprise me if we'd supplied the hint with two paragraphs. Changing to support this, or providing guidance for what to do in situations where you have more content would be great. |
Would it be possible to mention details about hint text in the typography section? This seems a logical place people might go to look up details / guidance for hint text. |
I've definitely used the Details component within hint text. I used it to give further examples – so the Details summary was "Examples" and contained good and sometimes bad examples of how to fill in the field. This was for an internal tool. |
We ran into an issue with the hint text guidance the other day - a colleague asked me if it was ok to use links in hint text, because there was nothing on the textarea guidance to advise against it. I found the appropriate guidance on the text input page but it would have been easy to miss. I wonder if there's an argument for hint text to be considered a component in its own right. That's what's done for error messages and character counts, for example - like hint text, both of those only exist as parts of other components. Individual components that allow hint text could then link to the hint text component guidance, as they do for error messages (for example on the Radios page) |
We've had some support queries recently relating to Hint guidance.
Currently there's no search result, and it is only covered on the Text input component, when the guidance is relevant to any input type.
The text was updated successfully, but these errors were encountered: