govuk-design-system-backlog
govuk-design-system-backlog copied to clipboard
Textarea
Use this issue to discuss this component in the GOV.UK Design System.
Is it possible to add a polyfill for the resize attribute? https://caniuse.com/#feat=css-resize
Unfortunately on Internet Explorer 11 the ability to resize a textarea is not built-in to the browser, but it's a feature that's been requested by some of our users (ticket with info on trello if you're interested).
A polyfill exists on npm https://www.npmjs.com/package/resize-polyfill but I was interested in whether adding such a thing to govuk-frontend had been discussed before or not.
This might be a daft question, but why is the component called textarea and not text area? Like the text input?
@adyhoran1 we try to stick closely to HTML naming, so in this case the element name is textarea. For text inputs the element name is input and the type is text, so separate words.
Hi all, I encountered a bug when using this component, the nunjucks flag disabled: true
does not seem to work. The text area is not set to read only when I have tried it, has anyone else experienced this?
@RAnderson96 Are you able to share your Nunjucks code and which version of GOV.UK Frontend your project is using?
Hi @querkmachine Thanks for the reply, below is the Nunjucks code and we are using "govuk-frontend": "^4.5.0"
{{ govukTextarea({ name: "objectives", id: "objectives", disabled: true, label: { text: "What are your objectives for the proposed control site(s)?", classes: "govuk-label--s" }, hint: { text: "Let us know what objectives this licence will allow you to meet that can't be achieved through other reasonable means." }, value: objectives }) }}
@RAnderson96 the disabled
Nunjucks macro option was added to the Textarea component in GOV.UK Frontend v4.6.0, so you'll need to update to that version or newer.
If you're still having issues once you've updated please let us know.
Thanks @36degrees ill give that a go and see if it works. Cheers folks
Can I suggest a different label/h1 to the example you have.
Currently it is Can you provide more detail? Its a question that would be more appropriate to use radio buttons to answer.
The text area is often a statement rather than a question. for example: "Tell us ...", "Provide .. " Enter.. ".