capitalize every word in an acronym (\acl command in the acro-package)

I would like to have a command which capitalizes every word when I use an \acl command of the acro-package.

\DeclareAcronym{t}{short={t},long={this is a test}}
\capitalizingcommand{\acl{t}}


My desired output would be:

This Is A Test

as far as i know the acro-package only supports the capitalization of the first word via \Acl{t}.

So far I tried the \ecapitalisewords command from the mfirstuc-package, but the expansion seems not to work and latex tries to capitalise the shortcut which results in an error.

This is my working or rather not working example.

\documentclass{article}
\usepackage{mfirstuc}
\usepackage{acro}

\DeclareAcronym{t}{short={t},long={this is a test}}
\begin{document}

\acl{t}
%\ecapitalisewords{\acl{t}}

\end{document}


You can't do this directly. However, you can define a macro which sets long-format to \capitalisewords in a group:

\documentclass{article}
\usepackage{mfirstuc}
\usepackage{acro}

\DeclareAcronym{t}{short={t},long={this is a test}}

\newcommand*\accapitalizelong[1]{%
\begingroup
\acsetup{long-format=\capitalisewords}%
#1%
\endgroup
}

\begin{document}

\acl{t}

\accapitalizelong{\acl{t}}

\acl{t}

\end{document}


If you instead want to generally change the uppercasing behaviour of all the \Ac... macros you can set the option uc-cmd:

\documentclass{article}
\usepackage{mfirstuc}
\usepackage{acro}

\DeclareAcronym{t}{short={t},long={this is a test}}

\acsetup{uc-cmd=\capitalisewords}

\begin{document}

\acl{t}

\Acl{t}

\end{document}


Of course you can also define a similar command like in my first suggestion to locally change uppercasing. Or even define a \ACL:

\documentclass{article}
\usepackage{mfirstuc}
\usepackage{acro}

\DeclareAcronym{t}{short={t},long={this is a test}}

\NewDocumentCommand\ACL{sm}{%
\begingroup
\acsetup{uc-cmd=\capitalisewords}%
\IfBooleanTF{#1}{\Acl*{#2}}{\Acl{#2}}%
\endgroup
}

\begin{document}

\acl{t}

\Acl{t}

\ACL{t}

\end{document}