-
Notifications
You must be signed in to change notification settings - Fork 90
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
Provide a disabled style for text inputs [DISCUSSION] #374
Comments
How about removing the border and background and styling as text? It is not an interactive element, so it doesn't need to look like one. |
@fofr normally we'd recommend doing something like that if an option wasn't available, but probably including changing the labels. I wonder if it works ok if the label is a question. Thoughts? |
Would that be a |
https://www.w3.org/TR/html4/interact/forms.html#h-17.12 Interestingly
|
As @timpaul pointed out, these 'disabled' things are mostly (entirely?) for admin interfaces where some of the considerations are different. |
We also need clear guidance on avoiding disabled text fields in favour of simply showing the text on the screen, say as a |
This just came up in Slack, so I'll post thoughts here. Okay, so the summary here is “If it can be set, we should style it”. I think that’s valid, but having them on show in Elements might give people the wrong ideas about using them. We can avoid that by styling them but not showing them. |
@philsherry I think this has three downsides.
In summary, I believe Elements / our future design system will have to have entries for all common elements, even if all it says is to avoid using a thing. |
The Elements interface is also used by people making changes to things as a sandbox to make sure they’re not breaking something. Removing them from the interface makes it a lot easier for people making changes to forget about e.g. disabled states and accidentally break them. I hope that the separation we will have between Frontend and the Design System (implementation details vs guidance and best practise) will make this clearer in the future, but it’s something we’ll need to look out for. |
All valid points, of course. In that case, should disabled elements require extra justification during assessment? If someone is using one, they really need to back up that usage with UR data. |
@philsherry I think / hope that's already the case. I'd certainly raise it if I thought they were being used inappropriately. |
@edwardhorsford autocomplete fail there, think you wanted @philsherry |
Following the launch of the GOV.UK Design System, GOV.UK Elements will now only get major bug fixes and security patches, so I'm going to close this. I've copied the initial comment and referenced this issue in the backlog issue for text inputs. |
Similar to #367, should we provide styles for disabled inputs? With our current styles there will be no visual difference if an input is disabled, which is not good.
Services will either have inputs that are identical but don't actually work (confusing) or come up with their own designs (inconsistent.
We do not recommend the use of disabled elements, but that doesn't mean they won't be used. There may also be situations where they can't be avoided - a 3rd party payment interface, for instance.
How would you expect it to work?
Disabled textboxes should have some visual difference when disabled.
How does it work currently?
Disabled inputs look identical to non-disabled inputs
Feel free to suggest a fix...
An example with the colours knocked back and a grey background applied.
The text was updated successfully, but these errors were encountered: