With aria attributes
Use describedby
when the textarea is described by an element outside the component; for example, when used in conjunction with a contextual guidance.
How it looks (preview)
The title must make clear what the content offers users. Use the words your users do to help them find this. Avoid wordplay or teases.
How to call this example
<%= render "govuk_publishing_components/components/contextual_guidance", {
html_for: "contextual-guidance-id",
guidance_id: "contextual-guidance",
content: sanitize("<p>The title must make clear what the content offers users. Use the words your users do to help them find this. Avoid wordplay or teases.</p>")
} do %>
<%= render "govuk_publishing_components/components/textarea", {
id: "contextual-guidance-id",
label: {
text: "Title",
bold: true
},
name: "described",
rows: 2,
describedby: "contextual-guidance"
} %>
<% end %>