What
Make the warning text component be callable
Why
We added support to allow our components to use caller() and allow larger chunks of HTML to be passed.
#2734
We chose not to do this for warning text because it's only typically used for short sentences.
Warning text: The main text of this component is presented inside of a element, negating the usefulness of using a caller, as it's unlikely to ever be more than one line of text.
However, on the Design System website we do use it beyond a single line:
https://github.com/alphagov/govuk-design-system/blob/d58a6028fdbbbb56665ab2010dca108bc14a1498/src/get-started/production/index.md?plain=1#L15-L22
And more importantly promoting the use of caller is better for security as it reduces the risk of XSS attacks
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
Warning text component:
What
Make the warning text component be callable
Why
We added support to allow our components to use caller() and allow larger chunks of HTML to be passed.
#2734
We chose not to do this for warning text because it's only typically used for short sentences.
However, on the Design System website we do use it beyond a single line:
https://github.com/alphagov/govuk-design-system/blob/d58a6028fdbbbb56665ab2010dca108bc14a1498/src/get-started/production/index.md?plain=1#L15-L22
And more importantly promoting the use of caller is better for security as it reduces the risk of XSS attacks
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
Warning text component: