# Setting page attributes of every page in a generated ConTeXt file

I'm trying to inject page metadata into a PDF generated with ConTeXt so that the pages have their tabbing order set to use the document structure (for accessibility checks).

Currently, I can inject the metadata but only on the current page of the document.

\startluacode
\stopluacode


This sets the tab order of one page, however, I can't seem to find a way to loop through every page in the document and re-run the code for each one. Is there an efficient way to do this?

To have certain stuff happen on every page you can use the \beforeeverypage and \aftereverypage hooks (or maybe \everyshipout?)
\appendtoks