Repository navigation
Details (Hidden text) #6095
Replies: 63 comments
|
In research HMRC have seen some users who are reluctant to interact with this component because it's styled as a link. They're worried that they will be taken away from the transaction and lose their data. |
|
@timpaul There are people who scan straight past it and do not interact with it. This could be because of time or lack of familiarity. But this means people can miss important content. From an accessibility point of view, they are not treated as links by screen readers assistive technology so the experience is totally different. A colleague wondered if anyone had thought to use the show-hide links, like in the manuals and learning to drive step-by-step guidance. Something like these screenshots. |
|
When there is text to show/hide. Does anyone have research to support whether it is better to change the label of the link between 'more detail' and 'less detail' or if it is better to keep a link as 'more detail'? Seems like it would make more sense if the link describes what it is doing and say 'less detail' when extra text is being shown but keeping the link labeled 'more detail' may be less cognitive load for the user. Any thoughts? |
|
@dashouse discovered that the native Bug tracked here. |
|
Since we're using plus and minus in the Accordion component, I thought I'd see how Details would look with the same symbols, as the behaviour is very similar: |
|
It looks like if you pass text to the details element it goes directly inside a div. Should it go in a paragraph? |
|
This came up again on the cross gov slack again. I think it could be helpful to include an example with more than one sentence - I think the correct thing to do is directly provide some html, but I'm not 100%. cc @frankieroberto who also had questions on this. |
|
@edwardhorsford yeah, if you use the My question was about Inset text, which I've raised here, although it's very similar: #822 |
|
In Nunjucks you can capture the contents of a block into a variable using block assignments, which might be easier for some users perhaps? An example Write the HTML in a separate block using Then reference that variable when using the macro: My other suggestion would be to leverage Nunjucks 'call' within the macro but that would mean rewriting the macro in govuk-frontend and although powerful they would probably add complexity and be a tricky concept to grasp for less experienced users of the toolkit. |
|
@paulmsmith I use the above approach heavily in my prototype - I wonder how well it's known by others. |
|
@edwardhorsford It is subtly documented in Nunjucks. If I get a minute I might do a pull request with an example for the docs maybe? For my own purposes I could be tempted to write a macro that uses 'call' but then uses the official macro under the hood.. I wouldn't suggest that to everybody because it is another level of abstraction but, it is a possibility. |
|
Using capturing like that is the safest way to pass HTML as it means you can avoid some cross site scripting vulnerabilities, I think it'd be good to have a general guide for this sort of stuff. Where possible I have recommended that the Design System examples should use capturing |
|
@NickColley Happy to contribute! Little stacked at the moment but will have more time next week. :) |
|
It would be good for you to capture some of your thoughts here please: alphagov/govuk-frontend#941 ! |
|
This component has been added to four questions in the Brexit checker: https://www.gov.uk/get-ready-brexit-check/questions?page=3 The checker provides users with a list of personalised actions that they need to take to prepare for a no deal Brexit. User research has shown that users don't understand why they are being asked certain questions, and how their answers will determine what actions they need to take. We want to carry out further user research to see how users respond, and to see if we could add it to all/more questions in the checker. We're also adding customised tracking to the component to help gain further insights. |
|
We have numerous bug reports open with the WebKit team regarding VoiceOver not announcing
|
|
Can I suggest checking out https://u-elements.github.io/u-elements/? |
Extracting a little (hopefully valuable) output from a lengthy discussion we've been having about the NHS.UK Details component whilst using it in a prototype at NHS BSA...
There is no better semantic option here – so the div is fine – but having an unwrapped text child in the Shouldn't the basic example of this component – even with just one line of text – use the |
|
Hi all, I've read through the above and we are finding similar issues to others still.
I then looked at the accordion which states that due to this type of research it was changed in 2021 away from looking like a link. This is from the Learning Records Service (LRS) |
|
@AnthonyDewhirst thank you for this feedback, we are trying to work on improving the experience for Voiceover and Dragon users. Our work is being captured and tracked in the following issues:
Are you able to let us know what assistive tech your accessibility testers were having trouble with? Currently we don't have redesigning it on the roadmap at the moment but feedback like this will help influence whether we prioritise it. |
|
@CharlotteDowns So sorry, that I never replied - yes, the screen readers were two actually:
|
|
Hello - some feedback from a user with accessibility needs (low vision, so uses magnifying/zoom technology): "That triangle link normally expands and closes. When I see blue underline I think it will take be to a different page. I don't know what to expect with arrow and underline". |
|
Just want to check in (as I'm still getting up to speed with GitHub) but do the issues with voiceover/dragon still exist? |
Curious to know if this ever got tested or if you discovered any insights about the order of the details component? |
|
I wonder if the content of the Ideally that would be dynamic, so, "show" when it's closed and "hide" when it's open (or similar words). For example, instead of "Help with nationality" it would start as "Show help with nationality". Has anyone tested such a change against the standard component? It would be good to see if that makes people less confused about what the component does. |
|
On the topic of users thinking the "link" would take them away from the page, we've had success with simply changing the direction of the arrow icon. We use a downward-pointing chevron in the closed state and rotate it to point up in the open state. When asked, users have said they expected it to toggle something open. |
|
From https://github.com/skununka315 (original post):
|









Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AKA: Hidden text, Expanding text area
Use this issue to discuss this component in the GOV.UK Design System.
All reactions