Repository navigation
Radios #6055
Replies: 63 comments
|
Interested in the advice to use error messages like 'Select yes if...'. |
Dropbox Paper auditOn 15 October 2018 the Design System team reviewed a Dropbox Paper document discussing the Radios component. The aim was to reduce the number of places containing guidance and code by:
Below is a record of the outcomes of that review. If you need to, you can see the original Dropbox Paper content in the internet archive. Review outcomesUpdates to the Design SystemThe Design System team will carry out the following updates to ensure that relevant, useful content from the Dropbox Paper file is added to the Design System.
|
|
Based on the above, we've updated the Design System guidance for: |
|
The dividers option appears to hardcode the width to 40px - meaning text other than 'or' is likely to break across several lines. I was trying to use dividers to group some related radios with a heading - though I guess this might be unwanted use case depending on how that text appeared to AT users. |
|
@edwardhorsford I think that is also discussed in alphagov/govuk-frontend#1079 The divider markup doesn't have the correct semantics to do anything other than 'or' right now... |
|
The term "inline" buttons is obscure for me and I didn't initially know it referred to an arrangement rather than a function or aesthetic. I worked out people were referring to an arrangement but it wasn't clear if it meant vertical or horizontal. I decided it meant vertically arranged because that's clearly a line of adjacent buttons, unlike horizontally arranged buttons mingled with text. Can the guidance say 'horizontal' instead of 'inline' and 'vertical' instead of stack'? |
|
Hi @terrysimpson99 – thank you for your feedback, it's a good point. I think we'd like to include the word "inline" as that's how it's described in the code, but we could consider also adding horizontal and vertical too, to make it clearer. I will discuss it with the team today and come back to you. |
|
Are there any examples of Conditional Radio buttons with an error on one of the conditional fields? |
|
Hi @ChazUK, this is the suggested style in that scenario This is achieved by adding the classes |
|
@rinto-cyriac I have no direct experience, but have a hunch you can get away with more than you might expect. I'd say it's totally worth trying as one list and seeing how it tests. I've seen anecdotal reports on slack of teams testing with larger numbers than they expected to work, and the tests being positive. A big factor that will affect how many you can show: will users know when they see the option that it's the right one (or will they have to continually scroll back and forth to compare several)? If relevant you may be able to group the options too. |
|
@edwardhorsford — thanks Ed for the comment, that's an interesting theory to validate it. I was also thinking of having a guidance text underneath some radios/departments that might seem confusing for the user (eg: reporting a dog foul might come under Leisure, parks and attractions as well as Environment) |
|
@rinto-cyriac have you considered an autocomplete? It sounds like it might be appropriate. You might also take a look at the FCO legalisation service - which did some great work about helping users select from a long list of possible documents - merging search with other selection mechanisms. |
|
@edwardhorsford — thank you. That was really valuable. Our scope didn't allow to go that extent initially, but it seems now that this component could be used in other areas in the website as well. |
|
The Nunjucks macro option to conditionally reveal content currently accepts an This HTML content is then rendered inside the fields containing the radios, and is revealed/hidden when the radio button is selected/deselected. Sometimes, it's desirable to have the revealed content appear after the fieldset containing the radio button, rather than within it — for example, when the revealed content is itself a fieldset. (Nested field sets can be a bit confusing to navigate when using screenreaders.) Is there any interest in allowing macro users to define separate content to be revealed/hidden? Perhaps by taking the ID attribute of the content? Or a boolean attribute to render the content after the fieldset, rather than within it? Or something else entirely? See also alphagov/govuk-frontend#718 |
|
@oddjones it's very hard to make this accessible, so I think this is a good candidate for this pattern: |
|
@joelanman nice - yeah that's a really good shout. I think we're going to go with your suggested pattern with a details component to divulge the additional access to the source documents, then keep the radios clear as suggested in the pattern. Thanks for commenting |
|
Hi can someone give some background on the following accessibility error raised. Conditionally revealed radio buttons are not announced to screen readers On the page (inserted below), there are three radio buttons that users can select from. Two of those radio buttons contain a conditionally revealed input field where users give either their phone number or their email address. In the speech viewer of the screen reader NVDA the radio button is listed as checked however the expanded action is not registered. This was done in Microsoft Edge. However when using Firefox the screen reader registers the conditional radio button as expanded and the word expanded appears in the speech viewer. Visually, it is clear that when users select this the field expands, but this information is not communicated via all screen readers. This will be frustrating for blind and visually impaired users who are not made aware of the dynamic change that appears on screen. It is not clear why this is occurring, as it has been coded to specification, meaning that We understand that the use of |
|
Should the reveals for radio buttons still be hidden if javascript is disabled/unavailable. I was fairly hiding them (and then revealing them) relied on javascript being enabled on the page in previous versions of govuk frontend. |
|
Following an accessibility audit we've had a "Major Impact on Functionality" flag as we're using the unsupported Here's a screengrab of Axe run against the radio component. I've seen that this was discussed back in 2018 but thought I'd bump it here for current guidance on GDS' stance. |
|
We use |
|
Like others in the thread, our recent accessibility audit of our internal service flagged that conditionally revealed inputs may not be communicated to users using screen readers. The auditors recommended adding visually hidden text within a. Our development team had a look at implementing this. They found that it can be achieved in plain text HTML more simply, but may require changes to the nunjucks component in order to apply this fix using the nunjucks components. |
Maximum number of radio options?Are there any findings or guidance on the maximum number of options to include in a list of radio items in .gov interfaces? There is debate around the maximum number of radio options that you can/should include in a radio button list. No maximum Max 5-7 options Here is further discussion on the max number of radio options. (https://ux.stackexchange.com/questions/86325/radio-buttons-or-dropdown-for-same-list-of-options) |
Discussion on this topic in cross gov slack |
Voiceover - iOS vs MacOS behaviourApologies if this is a known issue, but there seems to be an issue with how descriptions work in iOS vs the MacOS behaviour. When navigating through radio buttons on iOS the description provided via the aria-describedby attribute is provided to the user each time a radio is navigated to. This is not the case when using VoiceOver on Mac. This seems like frustrating behaviour and has been raised by a screen reader user during user research with DfE. Can provide recordings. |















Uh oh!
There was an error while loading. Please reload this page.
Use this issue to discuss this component in the GOV.UK Design System.
All reactions