@Welcome to the forum @terasa and thank you for your question.
Please be careful as using # on this forum has a purpose: it is to create a link to a tag. Therefore, could you please edit your post if your can and enclose your code in backticks ```#rect``` or simply `#rect` to avoid things such as #box becoming box?
I have taken the liberty to rephrase the title of your post to a question, as per our guidelines: How to post in the Questions category. Feel free to change it to your liking. I have also tagged your post with accessibility.
You need to ensure you have selected PDF/UA-1 as the PDF Standard. Otherwise the validation will fail as PAC will not validate the other formats generated by Typst (AFAIK).
I am asking because I can successfully validate a simple document using the latest PAC-2026. Try it: Typst
Glad it worked and that in the end it was as easy as that! Could you please mark this question as resolved by ticking the post you found the most useful? Enjoy Typst