You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make text and href correctly render default values when a falsy value is passed to the component, and add some tests checking this for undefined/null and different kinds of falsy values 0,'', false.
Why
The use of the default filter means only undefined values are replaced by the default value provided to the filter. This means a '' string as text would make the button render with no content, causing both visual and accessibility issues.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
Default values for text and href render when passed a 'falsy' value
Tests have been added for undefined/null and different kinds of falsy values 0,'', false
The text was updated successfully, but these errors were encountered:
romaricpascal
changed the title
Restore behaviour of Back link component for falsy text and href options
Restore behaviour of Back Link component for falsy text and href options
Aug 1, 2024
What
Make
text
andhref
correctly render default values when a falsy value is passed to the component, and add some tests checking this forundefined
/null
and different kinds of falsy values0
,''
,false
.Why
The use of the
default
filter means onlyundefined
values are replaced by the default value provided to the filter. This means a''
string astext
would make the button render with no content, causing both visual and accessibility issues.Who needs to work on this
Developers
Who needs to review this
Developers
Done when
text
andhref
render when passed a 'falsy' valueundefined
/null
and different kinds of falsy values0
,''
,false
The text was updated successfully, but these errors were encountered: